Questions tagged [zip4j]

A java open-source library to handle Zip files.

A library to work with .zip files. It has the following features

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

The project home page: http://www.lingala.net/zip4j/

126 questions
0
votes
1 answer

How to unzip multiple pssword protected zip files in an directory which has same password using java?

I am very new to java and I am trying to write an java program to unzip all zip files in an directory all of which have same password. I have written an program which unzips an particular zip file by giving the password. import…
user8268874
0
votes
2 answers

I am trying to extract password-protected ZIP files using zip4j jar file but i am getting error for following

I am very new to Java and I am trying to extract password-protected ZIP file using java and I have written code for the same but I am getting error for few methods such as isEncrypted(), fileHeaderList(), extractFile(), I searched for few related…
user8268874
0
votes
1 answer

Validating password protected ZIP files

I'm packing ZIP files using Zip4j. Sometimes, the created ZIP file seems to be (uploaded) corrupted via FTP so I would like to validate it. The code snippets from here don't work because they cause an exception on password protected archives by…
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
0
votes
1 answer

Append generated PDF with iText to Zip File

I have a Pdf generated with iText and I download it, I need to append it to a Zip file and download to, is this possible? This is my code public ActionForward descargarConstancia(ActionMapping mapping,ActionForm form, HttpServletRequest request,…
user2084446
  • 119
  • 2
  • 2
  • 8
0
votes
1 answer

Deleting file inside a zip in java

I have a folder which contains some files, now I want to append these files to a zip which already exists. If the file I am adding to the zip is already there, then I am replacing the old file with the new one. For zip operations I am using zip4j…
sayan-bose
  • 11
  • 1
  • 2
0
votes
1 answer

Use file data without giving anyone else permission

I have an application that use a .properties data containing password from DB, this application will be used by my client but I don't want to give him any kind of access to this properties data, not even if we look in the .jar. I thought to use…
0
votes
1 answer

Empty Folder when try to unzip using java.util.zip / zip4j

i have receive a compressed file in zip extension. i cannot open it directly using windows explorer. i can extract it using 7Zip, it throws some error but the file still decompressed as expected. i can extract it using winrar, no error, file…
cumibulat
  • 434
  • 3
  • 6
  • 22
0
votes
1 answer

zip headers not found. probably not a zip file

I develop one utility to add image to existing zip file.In most of case I get positve resulte. but in same case utility throw error of zip headers not found. probably not a zip file but file is open in "archive manager" or winrar. my code is as…
Sanjeetjh
  • 31
  • 2
  • 13
0
votes
2 answers

Extract ZIP in java

Folks, I am extracting the .zip files in java using zip4j API and able to extract the files I have used to zip the complete Directory to make zip and it contains the files and nested directory, using zipFile.addFolder(fileDirectory,…
Prajwal Bhat
  • 303
  • 2
  • 5
  • 21
0
votes
2 answers

Cannot create zip file in java using zip4j

I am using java to create a zip file, but I cannot get any code to work. I tried many more ways specific to java 7 and java 8, but all of them show some kind of error, is there a mistake in my code or it needs improvements? File…
user2197593
0
votes
3 answers

Zip4j Excluding Folders from Zip

I have a directory with some folders that should be skipped and not added to the target ZIP file. I marked them as hidden on Windows and I can query this attribute using Java code as follows: new File("C:\\myHiddenFolder").isHidden(); However, I…
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
0
votes
2 answers

Zip4J -> java.security.ProviderException: Could not construct MacSpi instance

I'm trying to use lingala zip4j to archive X509Certificate files. However, I am getting this strange exception only when I am unit testing with Junit. If I run my application as a product (which is a spring web app) - it works fine with no…
Hamid
  • 479
  • 6
  • 21
0
votes
0 answers

Extracting Password Protected Files inside ZIP file without losing the protection

I am trying to extract a ZIP file which contains a Password Protected PDF file. Below is my Code for Extracting ZIP file. ZipFile zipFile = new ZipFile(new File("C:\\Users\\sathesh\\Desktop\\temp.zip")); if (zipFile.isEncrypted()) { …
Sathesh S
  • 1,253
  • 3
  • 23
  • 54
0
votes
1 answer

Android list files in specific zip folder

I am trying to list files in a zip folder. I understand i can use the zip4j library or the java ZipFile class. My question is using either of these tools, how can I list files in a given directory within the zip?
Maclaren
  • 259
  • 3
  • 13
0
votes
1 answer

File object from Inputstream

I'd like to apply zip4j in my android app. I put a demo zip file into the assets folder (main/assets/test.zip). I'd like to open it with zip4j: import net.lingala.zip4j.core.ZipFile; ... ZipFile zipFile = new ZipFile(new…
toom
  • 12,864
  • 27
  • 89
  • 128
1 2 3
8 9