File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes size of a ZipEntry Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "size of a ZipEntry" Watch "size of a ZipEntry" New topic
Author

size of a ZipEntry

Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3855

All,

I ran into this issue that the size (compressed, uncompressed) etc.. are not getting updated after the data has been written and the ZipEntry is closed in the ZipOutputStream (those fields should be updated automatically). That is, upon reading the entire zip file back it returns -1 (for getSize(), etc...) always for each file written. Any tips/help on this?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
This might sound silly, but do you flush the stream?


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: size of a ZipEntry