API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.zip. ZipOutputStream View Source
Author(s)
David Connelly
Since
Version
1.35, 07/31/06
Serial
Hierarchy
 Object
      OutputStream
          FilterOutputStream
              DeflaterOutputStream
                  ZipOutputStream
Implements
 ZipConstants
Subclasses
Description
public class ZipOutputStream
  This class implements an output stream filter for writing files in the ZIP file format.
See also:   
Constructors
public ZipOutputStream (OutputStream out)
  Creates a new ZIP output stream.
Methods
Hide/Show inherited methods
public void close () throws IOException [Overrides DeflaterOutputStream]
  Closes the ZIP output stream as well as the stream being filtered.
public void closeEntry () throws IOException
  Closes the current ZIP entry and positions the stream for writing the next entry.
protected void deflate () throws IOException [Inherited From DeflaterOutputStream]
  Writes next block of compressed data to the output stream.
public void finish () throws IOException [Overrides DeflaterOutputStream]
  Finishes writing the contents of the ZIP output stream without closing the underlying stream.
public void flush () throws IOException [Inherited From FilterOutputStream]
  Flushes this output stream and forces any buffered output bytes to be written out to the stream.
pack-privatestatic int getUTF8Length (String s)
public void putNextEntry (ZipEntry e) throws IOException
  Begins writing a new ZIP file entry and positions the stream to the start of the entry data.
public void setComment (String comment)
  Sets the ZIP file comment.
public void setLevel (int level)
  Sets the compression level for subsequent entries which are DEFLATED.
public void setMethod (int method)
  Sets the default compression method for subsequent entries.
public void write (byte[] b) throws IOException [Inherited From FilterOutputStream]
  Writes b.length bytes to this output stream.
publicsynchronized void write (byte[] b, int off, int len) throws IOException [Overrides DeflaterOutputStream]
  Writes an array of bytes to the current ZIP entry data.
public void write (int b) throws IOException [Inherited From DeflaterOutputStream] [Specified in OutputStream]
  Writes a byte to the compressed output stream.
Fields
Hide/Show inherited fields
protected byte buf [Inherited From DeflaterOutputStream]
Output buffer for writing compressed data.
publicfinalstatic int CENATT = "36" [Inherited From ZipConstants]
publicfinalstatic int CENATX = "38" [Inherited From ZipConstants]
publicfinalstatic int CENCOM = "32" [Inherited From ZipConstants]
publicfinalstatic int CENCRC = "16" [Inherited From ZipConstants]
publicfinalstatic int CENDSK = "34" [Inherited From ZipConstants]
publicfinalstatic int CENEXT = "30" [Inherited From ZipConstants]
publicfinalstatic int CENFLG = "8" [Inherited From ZipConstants]
publicfinalstatic int CENHDR = "46" [Inherited From ZipConstants]
publicfinalstatic int CENHOW = "10" [Inherited From ZipConstants]
publicfinalstatic int CENLEN = "24" [Inherited From ZipConstants]
publicfinalstatic int CENNAM = "28" [Inherited From ZipConstants]
publicfinalstatic int CENOFF = "42" [Inherited From ZipConstants]
publicfinalstatic long CENSIG = "33639248" [Inherited From ZipConstants]
publicfinalstatic int CENSIZ = "20" [Inherited From ZipConstants]
publicfinalstatic int CENTIM = "12" [Inherited From ZipConstants]
publicfinalstatic int CENVEM = "4" [Inherited From ZipConstants]
publicfinalstatic int CENVER = "6" [Inherited From ZipConstants]
protected Deflater def [Inherited From DeflaterOutputStream]
Compressor for this stream.
publicfinalstatic int DEFLATED = "8"
Compression method for compressed (DEFLATED) entries.
publicfinalstatic int ENDCOM = "20" [Inherited From ZipConstants]
publicfinalstatic int ENDHDR = "22" [Inherited From ZipConstants]
publicfinalstatic int ENDOFF = "16" [Inherited From ZipConstants]
publicfinalstatic long ENDSIG = "101010256" [Inherited From ZipConstants]
publicfinalstatic int ENDSIZ = "12" [Inherited From ZipConstants]
publicfinalstatic int ENDSUB = "8" [Inherited From ZipConstants]
publicfinalstatic int ENDTOT = "10" [Inherited From ZipConstants]
publicfinalstatic int EXTCRC = "4" [Inherited From ZipConstants]
publicfinalstatic int EXTHDR = "16" [Inherited From ZipConstants]
publicfinalstatic int EXTLEN = "12" [Inherited From ZipConstants]
publicfinalstatic long EXTSIG = "134695760" [Inherited From ZipConstants]
publicfinalstatic int EXTSIZ = "8" [Inherited From ZipConstants]
publicfinalstatic int LOCCRC = "14" [Inherited From ZipConstants]
publicfinalstatic int LOCEXT = "28" [Inherited From ZipConstants]
publicfinalstatic int LOCFLG = "6" [Inherited From ZipConstants]
publicfinalstatic int LOCHDR = "30" [Inherited From ZipConstants]
publicfinalstatic int LOCHOW = "8" [Inherited From ZipConstants]
publicfinalstatic int LOCLEN = "22" [Inherited From ZipConstants]
publicfinalstatic int LOCNAM = "26" [Inherited From ZipConstants]
publicfinalstatic long LOCSIG = "67324752" [Inherited From ZipConstants]
publicfinalstatic int LOCSIZ = "18" [Inherited From ZipConstants]
publicfinalstatic int LOCTIM = "10" [Inherited From ZipConstants]
publicfinalstatic int LOCVER = "4" [Inherited From ZipConstants]
protected OutputStream out [Inherited From FilterOutputStream]
The underlying output stream to be filtered.
publicfinalstatic int STORED = "0"
Compression method for uncompressed (STORED) entries.
pack-private boolean usesDefaultDeflater [Inherited From DeflaterOutputStream]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar