java.util.zip
public
class
java.util.zip.GZIPOutputStream
The GZIPOutputStream class is used to write data to a stream in the GZIP
storage format.
Summary
Fields
Public Constructors
Public Methods
|
|
|
|
|
void |
finish() |
|
|
|
|
|
void |
write(byte[] buffer, int off, int nbytes) |
|
|
|
|
|
void |
close() |
|
|
|
|
|
void |
flush() |
|
|
|
|
|
void |
write(byte[] buffer) |
abstract |
|
|
|
|
void |
write(int oneByte) |
|
|
|
|
|
void |
write(byte[] buffer, int offset, int count) |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Fields
Public Constructors
public
GZIPOutputStream(OutputStream os)
Construct a new GZIPOutputStream to write data in GZIP format to the
underlying stream.
Parameters
os
| OutputStream to write to
|
public
GZIPOutputStream(OutputStream os, int size)
Construct a new GZIPOutputStream to write data in GZIP format to the
underlying stream. Set the internal compression buffer to sise size.
Parameters
os
| OutputStream to write to |
size
| Internal buffer size
|
Public Methods
public
void
finish()
Indicates to the stream that all data has been written out, and any GZIP
terminal data can now be output.
public
void
write(byte[] buffer, int off, int nbytes)
Write up to nbytes of data from buf, starting at offset off, to the
underlying stream in GZIP format.
Parameters
buffer
| Buffer of data to compress |
off
| offset in buffer to extract data from |
nbytes
| Number of bytes of data to compress and write |