• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read a passowrd protected zip file

 
Manish Hatwalne
Ranch Hand
Posts: 2595
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any built-in API in new Java for reading a password protected zip file?

TIA,
- Manish
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ftp://ftp.pkware.com/appnote.zip. 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!)
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
 
Manish Hatwalne
Ranch Hand
Posts: 2595
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read that faq on JGuru, but I am wondering if there is any built in support in new Java for this.

- Manish
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to I/O and Streams...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic