wood burning stoves 2.0*
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


Win a copy of Spring in Action this week in the Spring forum!
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: 3838

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.
 
wood burning stoves
 
subject: size of a ZipEntry