aspose file tools*
The moose likes Java in General and the fly likes View file from inside zip? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "View file from inside zip?" Watch "View file from inside zip?" New topic
Author

View file from inside zip?

Max Power
Ranch Hand

Joined: May 10, 2004
Posts: 47
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

Joined: Apr 28, 2004
Posts: 131
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


Get a better web browser:<br /><a href="http://www.mozilla.org/products/firefox/switch.html" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/switch.html</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: View file from inside zip?
 
Similar Threads
Opening a zip file using the ZipFile class
Display content of zip in JTree?
JAR file
zip file problem
Zip question