0

如何在java中归档两个文件?

我想到了如下代码:

public void archiveFiles(FileInputStream file1, FileInputStream file2, String fileName) throws IOException, ArchiveException {
  ZipArchiveOutputStream zipArchiveOutputStream = new ZipArchiveOutputStream(new File(fileName));
  ZipArchiveEntry zipArchiveEntry = new ZipArchiveEntry("");
  zipArchiveEntry.setSize(subpoenaFile.getChannel().size());
  zipArchiveOutputStream.putArchiveEntry(zipArchiveEntry);

但我被困住了;有人可以帮我完成这个吗?

4

0 回答 0