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