public class DummySink extends DeflaterOutputStream
buf, defout| Constructor and Description |
|---|
DummySink(OutputStream out)
Creates a new output stream with a defaul compressor and buffer size.
|
DummySink(OutputStream out,
Deflater def)
Creates a new output stream with the specified compressor and
a default buffer size.
|
DummySink(OutputStream out,
Deflater def,
int size)
Creates a new output stream with the specified compressor and
buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
int |
getCount() |
void |
resetCount() |
void |
setCount(int c) |
void |
write(byte[] b,
int off,
int len)
Writes an array of bytes to the compressed output stream.
|
void |
write(int b) |
deflate, finishwritepublic DummySink(OutputStream out, Deflater def, int size)
out - the output streamdef - the compressor ("deflater")IllegalArgumentException - if size is <= 0public DummySink(OutputStream out, Deflater def)
out - the output streamdef - the compressor ("deflater")public DummySink(OutputStream out)
public void close()
close in interface Closeableclose in interface AutoCloseableclose in class DeflaterOutputStreampublic void flush()
flush in interface Flushableflush in class DeflaterOutputStreampublic void write(int b)
throws IOException
write in class DeflaterOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class DeflaterOutputStreamoff - the start offset of the datalen - the length of the dataIOException - if an I/O error has occurredpublic int getCount()
public void setCount(int c)
public void resetCount()