Class Overview
The JarOutputStream
is used to write data in the JarFile
format to an arbitrary output stream
Summary
Public Methods |
void
|
putNextEntry(ZipEntry ze)
Writes the specified ZIP entry to the underlying stream.
|
[Expand]
Inherited Methods |
From class java.util.zip.ZipOutputStream
void
|
close()
Closes the current ZipEntry , if any, and the underlying output
stream.
|
void
|
closeEntry()
Closes the current ZipEntry .
|
void
|
finish()
Indicates that all entries have been written to the stream.
|
void
|
putNextEntry(ZipEntry ze)
Writes entry information to the underlying stream.
|
void
|
setComment(String comment)
Sets the ZipFile comment associated with the file being written.
|
void
|
setLevel(int level)
Sets the compression level to be used for writing entry data.
|
void
|
setMethod(int method)
Sets the compression method to be used when compressing entry data.
|
void
|
write(byte[] buffer, int off, int nbytes)
Writes data for the current entry to the underlying stream.
|
|
From class java.util.zip.DeflaterOutputStream
void
|
close()
Writes any unwritten compressed data to the underlying stream, the closes
all underlying streams.
|
void
|
deflate()
Compress the data in the input buffer and write it to the underlying
stream.
|
void
|
finish()
Writes any unwritten data to the underlying stream.
|
void
|
write(int i)
Writes one byte to the target stream.
|
void
|
write(byte[] buffer, int off, int nbytes)
Compresses nbytes of data from buf starting at
off and writes it to the underlying stream.
|
|
From class java.io.FilterOutputStream
void
|
close()
Closes this stream.
|
void
|
flush()
Ensures that all pending data is sent out to the target stream.
|
void
|
write(byte[] buffer)
Writes the entire contents of the byte array buffer to this
stream.
|
void
|
write(int oneByte)
Writes one byte to the target stream.
|
void
|
write(byte[] buffer, int offset, int count)
Writes count bytes from the byte array buffer starting at
offset to the target stream.
|
|
From class java.io.OutputStream
void
|
close()
Closes this stream.
|
void
|
flush()
Flushes this stream.
|
void
|
write(byte[] buffer)
Writes the entire contents of the byte array buffer to this
stream.
|
abstract
void
|
write(int oneByte)
Writes a single byte to this stream.
|
void
|
write(byte[] buffer, int offset, int count)
Writes count bytes from the byte array buffer starting at
position offset to this stream.
|
|
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
From interface java.io.Closeable
abstract
void
|
close()
Closes the object and release any system resources it holds.
|
|
From interface java.io.Flushable
abstract
void
|
flush()
Flushes the object by writing out any buffered data to the underlying
output.
|
|
Public Constructors
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
| the OutputStream to write to |
mf
| the Manifest to output for this JAR file. |
Throws
IOException
| if an error occurs creating the JarOutputStream .
|
public
JarOutputStream
(OutputStream os)
Constructs a new JarOutputStream
using an arbitrary output
stream.
Parameters
os
| the OutputStream to write to. |
Throws
IOException
| if an error occurs creating the JarOutputStream .
|
Public Methods
public
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
| the ZipEntry to write to. |