合并zip文件

来源:百度知道 编辑:UC知道 时间:2024/05/26 16:25:49
几个zip文件用什么软件合并,在哪下载,谢谢

http://news.chinabyte.com/325/1237825.shtml

要求在程序当中生成两个csv文件,然后将其合并在一个zip文件里输出

目前是这样实现的:
public static void main(String[] args) throws IOException{
// TODO Auto-generated method stub
FileOutputStream f = new FileOutputStream("c:\\test.zip");
CheckedOutputStream csum = new CheckedOutputStream(f, new Adler32());
ZipOutputStream zos = new ZipOutputStream(csum);
BufferedOutputStream out = new BufferedOutputStream(zos);
zos.setComment("A test of java zipping");

System.out.println("Writing file Father.java");

File tempFile = File.createTempFile("headerCSV", ".csv");
FileWriter fw = new FileWriter(tempFile);
fw.write("aaa,bbb,ccc,ddd,eee,fff,ggg,hhh\r\n");
fw.write("aa1,bb1,cc1,dd1,ee1,ff1,gg1