FileDocCategorySizeDatePackage
JarOutputStream.javaAPI DocAndroid 1.5 API2897Wed May 06 22:41:02 BST 2009java.util.jar

JarOutputStream

public class JarOutputStream extends ZipOutputStream
The {@code JarOutputStream} is used to write data in the {@code JarFile} format to an arbitrary output stream
since
Android 1.0

Fields Summary
private Manifest
manifest
Constructors Summary
public JarOutputStream(OutputStream os, Manifest mf)
Constructs a new {@code JarOutputStream} using an output stream. The content of the {@code Manifest} must match the JAR entry information written subsequently to the stream.

param
os the {@code OutputStream} to write to
param
mf the {@code Manifest} to output for this JAR file.
throws
IOException if an error occurs creating the {@code JarOutputStream}.

        super(os);
        if (mf == null) {
            throw new NullPointerException();
        }
        manifest = mf;
        ZipEntry ze = new ZipEntry(JarFile.MANIFEST_NAME);
        putNextEntry(ze);
        manifest.write(this);
        closeEntry();
    
public JarOutputStream(OutputStream os)
Constructs a new {@code JarOutputStream} using an arbitrary output stream.

param
os the {@code OutputStream} to write to.
throws
IOException if an error occurs creating the {@code JarOutputStream}.

        super(os);
    
Methods Summary
public voidputNextEntry(java.util.zip.ZipEntry ze)
Writes the specified ZIP entry to the underlying stream. The previous entry is closed if it is still open.

param
ze the {@code ZipEntry} to write to.
throws
IOException if an error occurs writing to the entry.
see
ZipEntry
since
Android 1.0

        super.putNextEntry(ze);