Skip to content

Most visited

Recently visited

navigation
Added in API level 1

JarOutputStream

public class JarOutputStream
extends ZipOutputStream

java.lang.Object
   ↳ java.io.OutputStream
     ↳ java.io.FilterOutputStream
       ↳ java.util.zip.DeflaterOutputStream
         ↳ java.util.zip.ZipOutputStream
           ↳ java.util.jar.JarOutputStream


The JarOutputStream is used to write data in the JarFile format to an arbitrary output stream

Summary

Inherited constants

From class java.util.zip.ZipOutputStream

Inherited fields

From class java.util.zip.DeflaterOutputStream
From class java.io.FilterOutputStream

Public constructors

JarOutputStream(OutputStream os, Manifest manifest)

Constructs a new JarOutputStream using an output stream.

JarOutputStream(OutputStream os)

Constructs a new JarOutputStream using an arbitrary output stream.

Public methods

void putNextEntry(ZipEntry ze)

Writes the specified ZIP entry to the underlying stream.

Inherited methods

From class java.util.zip.ZipOutputStream
From class java.util.zip.DeflaterOutputStream
From class java.io.FilterOutputStream
From class java.io.OutputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.io.Flushable
From interface java.lang.AutoCloseable

Public constructors

JarOutputStream

Added in API level 1
JarOutputStream (OutputStream os, 
                Manifest manifest)

Constructs a new JarOutputStream using an output stream. The content of the Manifest must match the JAR entry information written subsequently to the stream.

Parameters
os OutputStream: the OutputStream to write to
manifest Manifest: the Manifest to output for this JAR file.
Throws
IOException if an error occurs creating the JarOutputStream.

JarOutputStream

Added in API level 1
JarOutputStream (OutputStream os)

Constructs a new JarOutputStream using an arbitrary output stream.

Parameters
os OutputStream: the OutputStream to write to.
Throws
IOException if an error occurs creating the JarOutputStream.

Public methods

putNextEntry

Added in API level 1
void putNextEntry (ZipEntry ze)

Writes the specified ZIP entry to the underlying stream. The previous entry is closed if it is still open.

Parameters
ze ZipEntry: the ZipEntry to write to.
Throws
IOException if an error occurs writing to the entry.

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.