Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create an empty ZIP file?

807589Aug 21 2008 — edited Aug 21 2008
Hi,

when I try to create a ZIP file using java.util.zip.ZipOutputStream,

never call putNextEntry(ZipEntry),

but do close the stream,

the result is a 0-byte file instead of a valid empty ZIP file.

What am I doing wrong?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2008
Added on Aug 21 2008
8 comments
3,352 views