| |
|
| java.util.zip.DeflaterOutputStream java.util.zip.ZipOutputStream
All known Subclasses: java.util.jar.JarOutputStream,
Method Summary | |
public void | close() Closes the current ZipEntry if any. | public void | closeEntry() Closes the current ZipEntry. | public void | finish() Indicates that all entries have been written to the stream. | public void | putNextEntry(ZipEntry ze) Writes entry information for ze to the underlying stream. | public void | setComment(String comment) Sets the ZipFile comment associated with the file being written. | public void | setLevel(int level) Sets the compression level to be used for writing entry data. | public void | setMethod(int method) Sets the compression method to be used when compressing entry data. | static byte[] | toUTF8Bytes(String value, int length) | static int | utf8Count(String value) | public void | write(byte[] buffer, int off, int nbytes) Writes data for the current entry to the underlying stream. |
DEFLATED | final public static int DEFLATED(Code) | | Method for compressed entries
|
STORED | final public static int STORED(Code) | | Method for uncompressed entries
|
ZIPDataDescriptorFlag | final static int ZIPDataDescriptorFlag(Code) | | |
ZIPLocalHeaderVersionNeeded | final static int ZIPLocalHeaderVersionNeeded(Code) | | |
ZipOutputStream | public ZipOutputStream(OutputStream p1)(Code) | | Constructs a new ZipOutputStream on p1
Parameters: p1 - OutputStream The InputStream to output to |
close | public void close() throws IOException(Code) | | Closes the current ZipEntry if any. Closes the underlying output stream.
If the stream is already closed this method does nothing.
exception: IOException - If an error occurs closing the stream |
closeEntry | public void closeEntry() throws IOException(Code) | | Closes the current ZipEntry. Any entry terminal data is written to the
underlying stream.
exception: IOException - If an error occurs closing the entry |
finish | public void finish() throws IOException(Code) | | Indicates that all entries have been written to the stream. Any terminal
ZipFile information is written to the underlying stream.
exception: IOException - If an error occurs while finishing |
putNextEntry | public void putNextEntry(ZipEntry ze) throws java.io.IOException(Code) | | Writes entry information for ze to the underlying stream. Data associated
with the entry can then be written using write(). After data is written
closeEntry() must be called to complete the storing of ze on the
underlying stream.
Parameters: ze - ZipEntry to store exception: IOException - If an error occurs storing the entry See Also: ZipOutputStream.write |
setComment | public void setComment(String comment)(Code) | | Sets the ZipFile comment associated with the file being written.
Parameters: comment - the file comment |
setLevel | public void setLevel(int level)(Code) | | Sets the compression level to be used for writing entry data. This level
may be set on a per entry basis.
Parameters: level - the compression level, must have a value between 0 and 10. |
setMethod | public void setMethod(int method)(Code) | | Sets the compression method to be used when compressing entry data.
method must be one of STORED or DEFLATED.
Parameters: method - Compression method to use |
toUTF8Bytes | static byte[] toUTF8Bytes(String value, int length)(Code) | | |
write | public void write(byte[] buffer, int off, int nbytes) throws java.io.IOException(Code) | | Writes data for the current entry to the underlying stream.
exception: IOException - If an error occurs writing to the stream |
|
|
|