原文链接:How to Create Password-Protected Zip Files and Unzip Them in Java
1. Overview 概述
In a previous tutorial, we show how to zip and unzip in Java with the help of the java.util.zip package. But we don’t have any standard Java library to create password-protected zip files.
在上一篇文章中,介绍了如何在Java中使用 java.util.zip 包中的类来压缩、解压文件。在这篇文章中,我们将不再使用标准Java库,并创建一个有密码保护的压缩文件。
In this tutorial, we'll learn how to create password-protected zip files and unzip them with the Zip4j library. It's the most comprehensive Java library for zip files.
在这里,让我们一起学习如何创建有密码保护的压缩文件吧,以及如何解压它们。我们将要使用 Zip4j 库来实现这个功能,它是Java里操作zip文件功能最全面的库。