Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.util.zip.ZipException: invalid entry size error -- help required

843802Jan 27 2006 — edited Jun 25 2009
Hi all
I am sure this error would have been posted many number of times, but I would really appreciate if someone could help me with my problem. I am working on reading data from a .zip file, which in it has ~5GB data. All I am performing is a read operation through the piece of code specified below. This code worked well for .zip files handling till ~2.5GB

FileInputStream fis = new FileInputStream(filename);
BufferedInputStream bis = new BufferedInputStream(fis);
ZipInputStream zis = new ZipInputStream(bis);
StreamTokenizer tok = new StreamTokenizer( zis );
ZipEntry entry;

while((entry = zis.getNextEntry()) != null)
{
\\read from the zip file through the streamTokenizer
}

I just print what I read through the program, on the console.

But the error I get is
java.util.zip.ZipException: invalid entry size (expected 4294967295 but got 2117536490 bytes)
at java.util.zip.ZipInputStream.readEnd(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.io.StreamTokenizer.read(Unknown Source)
at java.io.StreamTokenizer.nextToken(Unknown Source)
at ZipFileStreams.getMessages(ZipFileStreams.java:677)
at ZipFileStreams.main(ZipFileStreams.java:814)

Could anybody give me hints as to what am I missing and where am i going wrong. Any help would be appreciated.
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2009
Added on Jan 27 2006
10 comments
18,316 views