Public Member Functions | |
| GZIPOutputStreamEx (OutputStream out, int size, int compression) throws IOException | |
| GZIPOutputStreamEx (OutputStream out, int compression) throws IOException | |
| synchronized void | write (byte[] buf, int off, int len) throws IOException |
| void | finish () throws IOException |
| void | close () throws IOException |
Protected Attributes | |
| CRC32 | crc = new CRC32() |
Private Member Functions | |
| void | writeHeader () throws IOException |
| void | writeTrailer () throws IOException |
| void | writeInt (int i) throws IOException |
| void | writeShort (int s) throws IOException |
Static Private Attributes | |
| static final int | GZIP_MAGIC = 0x8b1f |
Definition at line 10 of file GZIPOutputStreamEx.java.
| Encoder.GZIPOutputStreamEx.GZIPOutputStreamEx | ( | OutputStream | out, | |
| int | size, | |||
| int | compression | |||
| ) | throws IOException |
Creates a new output stream with the specified buffer size.
| out | the output stream | |
| size | the output buffer size |
| IOException | If an I/O error has occurred. | |
| IllegalArgumentException | if size is <= 0 |
Definition at line 29 of file GZIPOutputStreamEx.java.
| Encoder.GZIPOutputStreamEx.GZIPOutputStreamEx | ( | OutputStream | out, | |
| int | compression | |||
| ) | throws IOException |
Creates a new output stream with a default buffer size.
| out | the output stream |
| IOException | If an I/O error has occurred. |
Definition at line 41 of file GZIPOutputStreamEx.java.
| synchronized void Encoder.GZIPOutputStreamEx.write | ( | byte[] | buf, | |
| int | off, | |||
| int | len | |||
| ) | throws IOException |
Writes array of bytes to the compressed output stream. This method will block until all the bytes are written.
| buf | the data to be written | |
| off | the start offset of the data | |
| len | the length of the data |
| IOException | If an I/O error has occurred. |
Definition at line 54 of file GZIPOutputStreamEx.java.
| void Encoder.GZIPOutputStreamEx.finish | ( | ) | throws IOException |
Finishes writing compressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.
| IOException | if an I/O error has occurred |
Definition at line 67 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.close().
| void Encoder.GZIPOutputStreamEx.close | ( | ) | throws IOException |
Writes remaining compressed data to the output stream and closes the underlying stream.
| IOException | if an I/O error has occurred |
Definition at line 85 of file GZIPOutputStreamEx.java.
| void Encoder.GZIPOutputStreamEx.writeHeader | ( | ) | throws IOException [private] |
Definition at line 94 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.GZIPOutputStreamEx().
| void Encoder.GZIPOutputStreamEx.writeTrailer | ( | ) | throws IOException [private] |
Definition at line 107 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.finish().
| void Encoder.GZIPOutputStreamEx.writeInt | ( | int | i | ) | throws IOException [private] |
Definition at line 116 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.writeHeader(), and Encoder.GZIPOutputStreamEx.writeTrailer().
| void Encoder.GZIPOutputStreamEx.writeShort | ( | int | s | ) | throws IOException [private] |
Definition at line 125 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.writeHeader(), and Encoder.GZIPOutputStreamEx.writeInt().
CRC32 Encoder.GZIPOutputStreamEx.crc = new CRC32() [protected] |
CRC-32 of uncompressed data.
Definition at line 15 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.GZIPOutputStreamEx(), Encoder.GZIPOutputStreamEx.write(), and Encoder.GZIPOutputStreamEx.writeTrailer().
final int Encoder.GZIPOutputStreamEx.GZIP_MAGIC = 0x8b1f [static, private] |
Definition at line 20 of file GZIPOutputStreamEx.java.
Referenced by Encoder.GZIPOutputStreamEx.writeHeader().
1.5.5