aspose file tools*
The moose likes I/O and Streams and the fly likes What happens when we open a ZipOutputStream and close it without any entrySet ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "What happens when we open a ZipOutputStream and close it without any entrySet ?" Watch "What happens when we open a ZipOutputStream and close it without any entrySet ?" New topic
Author

What happens when we open a ZipOutputStream and close it without any entrySet ?

mahavir swami
Greenhorn

Joined: Sep 18, 2009
Posts: 13


here i have just created a ZipOutputStream and then closed it without writing any file , and then while closing it
i get an exception saying zipfile must have atleast one entry.
now why is it like this?
and if file does not get closed then what happens to the outputstream reference ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What happens when we open a ZipOutputStream and close it without any entrySet ?