Error in unzip for large files
Hi,
I am using java unzip functionality to unzip a file which is greater than 100 MB.
When I test my code in Windows, the unzip functionality works fine.
But my requirement is to run the program in unix env. When i try the same code in unix env, i am getting the below exception -
05:15:38,180 ERROR main UnzipFile:148 - Errror in UNZIP File: invalid entry size (expected 121761181 but got 121757886 bytes)
java.util.zip.ZipException: invalid entry size (expected 121761181 but got 121757886 bytes)
Can you please help me in resolving this error.
Sample Code -
OutputStream out = new FileOutputStream(outFilename);
// Transfer bytes from the ZIP file to the output file
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
Thanks in advance.