Build 1.0_r1(from source)

java.util.jar
Class JarOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.util.zip.DeflaterOutputStream
              extended by java.util.zip.ZipOutputStream
                  extended by java.util.jar.JarOutputStream
All Implemented Interfaces:
Closeable, Flushable, ZipConstants

public class JarOutputStream
extends ZipOutputStream

The JarOutputStream is used to output data in JarFile format.


Field Summary
 
Fields inherited from class java.util.zip.ZipOutputStream
DEFLATED, STORED
 
Fields inherited from class java.util.zip.DeflaterOutputStream
buf, def
 
Fields inherited from class java.io.FilterOutputStream
out
 
Fields inherited from interface java.util.zip.ZipConstants
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER
 
Constructor Summary
JarOutputStream(OutputStream os)
          Constructs a new JarOutputStream using os as the underlying stream.
JarOutputStream(OutputStream os, Manifest mf)
          Constructs a new JarOutputStream using os as the underlying stream.
 
Method Summary
 void putNextEntry(ZipEntry ze)
          Writes the specified entry to the underlying stream.
 
Methods inherited from class java.util.zip.ZipOutputStream
close, closeEntry, finish, setComment, setLevel, setMethod, write
 
Methods inherited from class java.util.zip.DeflaterOutputStream
deflate, write
 
Methods inherited from class java.io.FilterOutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarOutputStream

public JarOutputStream(OutputStream os,
                       Manifest mf)
                throws IOException
Constructs a new JarOutputStream using os as the underlying stream. Manifest information for the JarFile to be written is obtained from the parameter Manifest, mf.

Parameters:
os - The OutputStream to write to
mf - The Manifest to output for this Jar.
Throws:
IOException - If an error occurs creating the JarOutputStream

JarOutputStream

public JarOutputStream(OutputStream os)
                throws IOException
Constructs a new JarOutputStream using os as the underlying stream.

Parameters:
os - The OutputStream to write to
Throws:
IOException - If an error occurs creating the JarOutputStream
Method Detail

putNextEntry

public void putNextEntry(ZipEntry ze)
                  throws IOException
Writes the specified entry to the underlying stream. The previous entry is closed if it is still open.

Overrides:
putNextEntry in class ZipOutputStream
Parameters:
ze - The ZipEntry to write
Throws:
IOException - If an error occurs writing the entry
See Also:
ZipOutputStream.write(byte[], int, int)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature