• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Read a passowrd protected zip file

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any built-in API in new Java for reading a password protected zip file?

TIA,
- Manish
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!)
 
Ranch Hand
Posts: 8953
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.jguru.com/faq/view.jsp?EID=234256
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to I/O and Streams...
 
Evildoers! Eat my justice! And this tiny ad's justice too!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic