public class DummySink
extends java.util.zip.DeflaterOutputStream
Constructor and Description |
---|
DummySink(java.io.OutputStream out)
Creates a new output stream with a defaul compressor and buffer size.
|
DummySink(java.io.OutputStream out,
java.util.zip.Deflater def)
Creates a new output stream with the specified compressor and
a default buffer size.
|
DummySink(java.io.OutputStream out,
java.util.zip.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) |
public DummySink(java.io.OutputStream out, java.util.zip.Deflater def, int size)
out
- the output streamdef
- the compressor ("deflater")java.lang.IllegalArgumentException
- if size is <= 0public DummySink(java.io.OutputStream out, java.util.zip.Deflater def)
out
- the output streamdef
- the compressor ("deflater")public DummySink(java.io.OutputStream out)
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.util.zip.DeflaterOutputStream
public void flush()
flush
in interface java.io.Flushable
flush
in class java.util.zip.DeflaterOutputStream
public void write(int b) throws java.io.IOException
write
in class java.util.zip.DeflaterOutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.util.zip.DeflaterOutputStream
off
- the start offset of the datalen
- the length of the datajava.io.IOException
- if an I/O error has occurredpublic int getCount()
public void setCount(int c)
public void resetCount()