This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

View file from inside zip?  RSS feed

 
Max Power
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, is it somehow possible to view a file from inside a zip file?
Here is my code:




Do I need to unpack the file before reading?

THANKS
 
Petr Blahos
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Why don't you use ZipInputStream?
ZipEntry ze = (ZipEntry)entries.nextElement();
InputStream is = zipfile.getInputStream(ze);


But technically the file will be unpacked before viewing ;-)

Best regards,
Petr
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!