File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Question on Handling/Getting Info on Items in Zip File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Question on Handling/Getting Info on Items in Zip File" Watch "Question on Handling/Getting Info on Items in Zip File" New topic
Author

Question on Handling/Getting Info on Items in Zip File

Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
I have a zip file in memory only, so I basically only have it as a stream (ZipInputStream).
I want to get information on the documents inside, but do not know how. For example, I do know the name (ZipEntry.getName), but is it possible to get the size (uncompressed), file-type, maybe properties (I know this would be so varied that it'd be a pain to do so, but I thought I'd throw it in there)?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
ZipEntry has a number of methods that seem relevant in addition to getName() - have you looked at the rest of its API?


"I'm not back." - Bill Harding, Twister
 
GeeCON Prague 2014
 
subject: Question on Handling/Getting Info on Items in Zip File