Skip to Main Content

Java Programming

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.ZipFile.entries() shows only 99 files but zip file is fine.

807603Oct 19 2007 — edited Oct 20 2007
Hi,

I have a wierd issue with java.util.zip.ZipFile

Code as simple as

ZipFile file = new ZipFile("my.zip") ;
System.out.println(file.size());

For this particular zip file, it says 99 files found but the zip contains more than 60,000 files. I tried the zip with unzip and zip utilities and the zip file checks out fine. I even tried to unzip the contents, and zip 'em up all over again, just to eliminate the chances of corruption while the zip was being transferred over the network.

The same program works fine with another zip containing more or less the same number of files and prints 63730.

Any idea? This can not possibly be related to the type of files the zips contain? right? In any case, the contents of both zips are text/xml files.

Any help would be greatly appreciated.

Regards,
ZiroFrequency
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2007
Added on Oct 19 2007
7 comments
1,138 views