如何在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);
但我被困住了;有人可以帮我完成这个吗?