https://github.com/srikanth-lingala/zip4j

 

ZipParameters zipParameters = new ZipParameters();
zipParameters.setEncryptFiles(true);
zipParameters.setEncryptionMethod(EncryptionMethod.ZIP_STANDARD);

   List<File> filesToAdd = Arrays.asList(
       new File("somefile"),
       new File("someotherfile")
   );

ZipFile zipFile = new ZipFile("E:/filename".zip", "password".toCharArray());
zipFile.addFiles(filesToAdd, zipParameters);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2021-12-08
  • 2021-12-25
  • 2022-12-23
  • 2021-08-18
猜你喜欢
  • 2021-04-02
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2021-08-04
  • 2021-11-19
相关资源
相似解决方案