API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.jar. JarOutputStream View Source
Author(s)
David Connelly
Since
1.2
Version
1.24, 01/09/07
Serial
Hierarchy
 Object
      OutputStream
          FilterOutputStream
              DeflaterOutputStream
                  ZipOutputStream
                      JarOutputStream
Implements
Subclasses
Description
public class JarOutputStream
  The JarOutputStream class is used to write the contents of a JAR file to any output stream.
See also:    Manifest ZipOutputStream
Constructors
public JarOutputStream (OutputStream out) throws IOException
  Creates a new JarOutputStream with no manifest.
public JarOutputStream (OutputStream out, Manifest man) throws IOException
  Creates a new JarOutputStream with the specified Manifest.
Methods
Hide/Show inherited methods
public void close () throws IOException [Inherited From ZipOutputStream]
  Closes the ZIP output stream as well as the stream being filtered.
public void closeEntry () throws IOException [Inherited From ZipOutputStream]
  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 [Inherited From ZipOutputStream]
  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.
public void putNextEntry (ZipEntry ze) throws IOException [Overrides ZipOutputStream]
  Begins writing a new JAR file entry and positions the stream to the start of the entry data.
public void setComment (String comment) [Inherited From ZipOutputStream]
  Sets the ZIP file comment.
public void setLevel (int level) [Inherited From ZipOutputStream]
  Sets the compression level for subsequent entries which are DEFLATED.
public void setMethod (int method) [Inherited From ZipOutputStream]
  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 [Inherited From ZipOutputStream]
  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.
protected Deflater def [Inherited From DeflaterOutputStream]
Compressor for this stream.
publicfinalstatic int DEFLATED = "8" [Inherited From ZipOutputStream]
Compression method for compressed (DEFLATED) entries.
protected OutputStream out [Inherited From FilterOutputStream]
The underlying output stream to be filtered.
publicfinalstatic int STORED = "0" [Inherited From ZipOutputStream]
Compression method for uncompressed (STORED) entries.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar