API Overview API Index Package Overview Direct link to this page
Apache Ant 1.7.1
  org.apache.tools.zip. ZipOutputStream View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      OutputStream
          FilterOutputStream
              ZipOutputStream
Implements
Subclasses
Description
public class ZipOutputStream
  Reimplementation of java.util.zip.ZipOutputStream that does handle the extended functionality of this package, especially internal/external file attributes and extra fields with different layouts for local file data and central directory entries.
See also:   
Constructors
public ZipOutputStream (java.io.File file) throws java.io.IOException
  Creates a new ZIP OutputStream writing to a File.
public ZipOutputStream (java.io.OutputStream out)
  Creates a new ZIP OutputStream filtering the underlying stream.
Methods
Hide/Show inherited methods
protectedstatic long adjustToLong (int i)
  Assumes a negative integer really is a positive integer that has wrapped around and re-creates the original value.
public void close () throws java.io.IOException [Overrides java.io.FilterOutputStream]
  Closes this output stream and releases any system resources associated with the stream.
public void closeEntry () throws java.io.IOException
  Writes all necessary data for this entry.
protectedfinal void deflate () throws java.io.IOException
  Writes next block of compressed data to the output stream.
public void finish () throws java.io.IOException
  Finishs writing the contents and closes this as well as the underlying stream.
public void flush () throws java.io.IOException [Overrides java.io.FilterOutputStream]
  Flushes this output stream and forces any buffered output bytes to be written out to the stream.
protected byte getBytes (java.lang.String name) throws java.util.zip.ZipException
  Retrieve the bytes for the given String in the encoding set for this Stream.
public java.lang.String getEncoding ()
  The encoding to use for filenames and the file comment.
public boolean isSeekable ()
  This method indicates whether this archive is writing to a seekable stream (i.e., to a random access file).
public void putNextEntry (ZipEntry ze) throws java.io.IOException
  Begin writing next entry.
public void setComment (java.lang.String comment)
  Set the file comment.
public void setEncoding (java.lang.String encoding)
  The encoding to use for filenames and the file comment.
public void setLevel (int level)
  Sets the compression level for subsequent entries.
public void setMethod (int method)
  Sets the default compression method for subsequent entries.
protectedstatic ZipLong toDosTime (java.util.Date time)
  Convert a Date object to a DOS date/time field.
protectedstatic byte toDosTime (long t)
  Convert a Date object to a DOS date/time field.
public void write (byte[] arg0) throws java.io.IOException [Inherited From java.io.FilterOutputStream]
public void write (byte[] b, int offset, int length) throws java.io.IOException [Overrides java.io.FilterOutputStream]
  Writes bytes to ZIP entry.
public void write (int b) throws java.io.IOException [Overrides java.io.FilterOutputStream] [Specified in java.io.OutputStream]
  Writes a single byte to ZIP entry.
protected void writeCentralDirectoryEnd () throws java.io.IOException
  Writes the "End of central dir record".
protected void writeCentralFileHeader (ZipEntry ze) throws java.io.IOException
  Writes the central file header entry.
protected void writeDataDescriptor (ZipEntry ze) throws java.io.IOException
  Writes the data descriptor entry.
protected void writeLocalFileHeader (ZipEntry ze) throws java.io.IOException
  Writes the local file header entry
protectedfinal void writeOut (byte[] data) throws java.io.IOException
  Write bytes to output or random access file.
protectedfinal void writeOut (byte[] data, int offset, int length) throws java.io.IOException
  Write bytes to output or random access file.
Fields
Hide/Show inherited fields
protected byte buf
  This buffer servers as a Deflater.
protectedfinalstatic byte CFH_SIG
  central file header signature
protectedfinalstatic byte DD_SIG
  data descriptor signature
protected java.util.zip.Deflater def
  This Deflater object is used for output.
publicfinalstatic int DEFAULT_COMPRESSION = "-1"
  Default compression level for deflated entries.
publicfinalstatic int DEFLATED = "8"
  Compression method for deflated entries.
protectedfinalstatic byte EOCD_SIG
  end of central dir signature
protectedfinalstatic byte LFH_SIG
  local file header signature
protected java.io.OutputStream out [Inherited From java.io.FilterOutputStream]
publicfinalstatic int STORED = "0"
  Compression method for stored entries.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar