public class EvioGZIPOutputStream
extends java.util.zip.GZIPOutputStream
This class implements a stream filter for writing compressed data in the GZIP file format.
Constructor and Description |
---|
EvioGZIPOutputStream(java.io.OutputStream out)
Creates a new output stream with a default buffer size.
|
EvioGZIPOutputStream(java.io.OutputStream out,
boolean syncFlush)
Creates a new output stream with a default buffer size and
the specified flush mode.
|
EvioGZIPOutputStream(java.io.OutputStream out,
int size)
Creates a new output stream with the specified buffer size.
|
Modifier and Type | Method and Description |
---|---|
void |
write(byte[] buf,
int off,
int len)
Avoid calling the parent's synchronized write method by extending
and calling the unsynchronized grandparent method directly.
|
public EvioGZIPOutputStream(java.io.OutputStream out, int size) throws java.io.IOException
The new output stream instance is created as if by invoking the 3-argument constructor GZIPOutputStream(out, size, false).
out
- the output streamsize
- the output buffer sizejava.io.IOException
- If an I/O error has occurred.java.lang.IllegalArgumentException
- if size <= 0
public EvioGZIPOutputStream(java.io.OutputStream out) throws java.io.IOException
The new output stream instance is created as if by invoking the 2-argument constructor GZIPOutputStream(out, false).
out
- the output streamjava.io.IOException
- If an I/O error has occurred.public EvioGZIPOutputStream(java.io.OutputStream out, boolean syncFlush) throws java.io.IOException
out
- the output streamsyncFlush
- if true
invocation of the inherited
flush()
method of
this instance flushes the compressor with flush mode
Deflater.SYNC_FLUSH
before flushing the output
stream, otherwise only flushes the output streamjava.io.IOException
- If an I/O error has occurred.public void write(byte[] buf, int off, int len) throws java.io.IOException
Writes array of bytes to the compressed output stream. This method will block until all the bytes are written.
write
in class java.util.zip.GZIPOutputStream
buf
- the data to be writtenoff
- the start offset of the datalen
- the length of the datajava.io.IOException
- If an I/O error has occurred.