您只想复制完整的zip文件?不需要打开并阅读zip文件…复制它就像复制其他文件一样。
public final static int BUF_SIZE = 1024; //can be much bigger, see comment belowpublic static void copyFile(File in, File out) throws Exception { FileInputStream fis = new FileInputStream(in); FileOutputStream fos = new FileOutputStream(out); try { byte[] buf = new byte[BUF_SIZE]; int i = 0; while ((i = fis.read(buf)) != -1) { fos.write(buf, 0, i); } } catch (Exception e) { throw e; } finally { if (fis != null) fis.close(); if (fos != null) fos.close(); }}


