RobinHo
RobinHo

Reputation: 575

Reading Password-Protected ZIP Files in Java

I have zipped and protected a file with a password. Now I need to retrieve the file back with java. So I need to unlock the password and unzip with Java to make a proper connection to the file.

My first Questions is: Does Java unzip and unlock the zipped file on the local drive? (So no point protecting it?).

I have read all about encryption, but really searching for the easiest way here. This link: http://blog.alutam.com/2009/10/31/reading-password-protected-zip-files-in-java/

My second Question is about the link above: I cannot find the lines where he is pointing to his zipped file on the local drive+ the password he uses to unlock the file (is it hardcoded?)

Thank you

Upvotes: 1

Views: 5575

Answers (1)

Helios
Helios

Reputation: 851

You may want to have a look on Zip4j

Key features:

  1. Create, Add, Extract, Update, Remove files from a Zip file
  2. Read/Write password protected Zip files
  3. Supports AES 128/256 Encryption
  4. Supports Standard Zip Encryption
  5. Supports Zip64 format
  6. Supports Store (No Compression) and Deflate compression method
  7. Create or extract files from Split Zip files (Ex: z01, z02,...zip)
  8. Supports Unicode file names
  9. Progress Monitor

Upvotes: 4

Related Questions