ZipOutputStream

public class ZipOutputStream extends DeflaterOutputStream
Known Direct Subclasses

This class implements an output stream filter for writing files in the ZIP file format. Includes support for both compressed and uncompressed entries.

Constant Summary

int CENATT
int CENATX
int CENCOM
int CENCRC
int CENDSK
int CENEXT
int CENFLG
int CENHDR
int CENHOW
int CENLEN
int CENNAM
int CENOFF
long CENSIG
int CENSIZ
int CENTIM
int CENVEM
int CENVER
int DEFLATED Compression method for compressed (DEFLATED) entries.
int ENDCOM
int ENDHDR
int ENDOFF
long ENDSIG
int ENDSIZ
int ENDSUB
int ENDTOT
int EXTCRC
int EXTHDR
int EXTLEN
long EXTSIG
int EXTSIZ
int LOCCRC
int LOCEXT
int LOCFLG
int LOCHDR
int LOCHOW
int LOCLEN
int LOCNAM
long LOCSIG
int LOCSIZ
int LOCTIM
int LOCVER
int STORED Compression method for uncompressed (STORED) entries.

Inherited Field Summary

Public Constructor Summary

ZipOutputStream(OutputStream out)
Creates a new ZIP output stream.
ZipOutputStream(OutputStream out, Charset charset)
Creates a new ZIP output stream.

Public Method Summary

void
close()
Closes the ZIP output stream as well as the stream being filtered.
void
closeEntry()
Closes the current ZIP entry and positions the stream for writing the next entry.
void
finish()
Finishes writing the contents of the ZIP output stream without closing the underlying stream.
void
putNextEntry(ZipEntry e)
Begins writing a new ZIP file entry and positions the stream to the start of the entry data.
void
setComment(String comment)
Sets the ZIP file comment.
void
setLevel(int level)
Sets the compression level for subsequent entries which are DEFLATED.
void
setMethod(int method)
Sets the default compression method for subsequent entries.
synchronized void
write(byte[] b, int off, int len)
Writes an array of bytes to the current ZIP entry data.

Inherited Method Summary