java.util.jar

Class JarOutputStream

public class JarOutputStream extends ZipOutputStream

OutputStream for writing jar files. A special ZipOutputStream that can take JarEntries and can have a optional Manifest as first entry.
Constructor Summary
JarOutputStream(OutputStream out)
Creates a new JarOutputStream without a manifest entry.
JarOutputStream(OutputStream out, Manifest man)
Creates a new JarOutputStream with a manifest entry.
Method Summary
voidputNextEntry(ZipEntry entry)
Prepares the JarOutputStream for writing the next entry.

Constructor Detail

JarOutputStream

public JarOutputStream(OutputStream out)
Creates a new JarOutputStream without a manifest entry.

Parameters: out the stream to create the new jar on

Throws: IOException if something unexpected happend

JarOutputStream

public JarOutputStream(OutputStream out, Manifest man)
Creates a new JarOutputStream with a manifest entry. The manifest will be the first entry in the jar.

Parameters: out the stream to create the new jar on man the manifest that should be put in the jar file or null for no manifest entry

Throws: IOException if something unexpected happend

Method Detail

putNextEntry

public void putNextEntry(ZipEntry entry)
Prepares the JarOutputStream for writing the next entry. This implementation just calls super.putNextEntry().

Parameters: entry The information for the next entry

Throws: IOException when some unexpected I/O exception occurred