0

Javaで2つのファイルをアーカイブするにはどうすればよいですか?

私は次のようなコードを考えました:

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