How do I unzip a file that is password-protected?

Tim Rohaly

The Java classes that read Zip files, e.g. ZipInputStream, do not support decrypting password-protected Zip files. I don't know of any publicly-available code in Java which will do this, either. But this functionality is straightforward to add yourself. The decryption algorithm needed is described in You can subclass the existing Java classes to add support for decryption; you will also have to define a mechanism for a user of your subclass to enter the appropriate password, using a dialog box for example. (And if you do so, please make that code publically available and submit a link to that code as feedback to this question!)

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact