GeeCON Prague 2014*
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


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 ?
 
GeeCON Prague 2014
 
subject: What happens when we open a ZipOutputStream and close it without any entrySet ?