• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

View file from inside zip?

 
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