0

How can I archive two files in java?

I thought of code like:

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);

But I am stuck; can someone help me completing this?

GhostCat
  • 137,827
  • 25
  • 176
  • 248
roki
  • 348
  • 3
  • 15
  • 1
    I improved the formatting of code; and tried to express the underlying issue. But the question is still a bit unclear - missing a clear explanation on what is expected from the readers how to help. – GhostCat May 02 '17 at 19:00
  • by using `putArchiveEntry` twice??? –  May 02 '17 at 20:13

0 Answers0