This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Handling/Getting Info on Items in Zip File

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ZipEntry has a number of methods that seem relevant in addition to getName() - have you looked at the rest of its API?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic