File file1 = new File(a.txt);
File file2 = new File(b.txt);
File file3 = new File(c.txt);
生成三个txt文件 我能把这三个txt 弄成一个压缩包吗
File zipFile = new File(abc.zip);
InputStream input;
//可以这么写吗 把这三个txt压缩成一个 zip
input = new FileInputStream(file1,file2,file3);
ZipOutputStream zipOut = null;
zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
|
|