public class CompressableOutputStream extends FilterOutputStream implements FinishableOutputStream
out
Constructor and Description |
---|
CompressableOutputStream(OutputStream out)
Creates a Compressable Output Stream from given stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finish()
Finishes the current outputstream (compresses, flushes, caluclates CRC)
and writes whatever is left in the buffers, but does not close the
stream.
|
void |
startCompressing()
Start compressing from the next byte onwards.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected void |
writeByteArray(byte[] bytes,
int offset,
int length) |
protected void |
writeSingleByte(int b) |
flush, write
public CompressableOutputStream(OutputStream out)
out
- stream to write topublic final void write(int b) throws IOException
write
in class FilterOutputStream
IOException
protected void writeSingleByte(int b) throws IOException
IOException
public final void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
protected void writeByteArray(byte[] bytes, int offset, int length) throws IOException
IOException
public void finish() throws IOException
FinishableOutputStream
finish
in interface FinishableOutputStream
IOException
- if write failspublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
public void startCompressing() throws IOException
IOException
- if write failsCopyright © 2016. All rights reserved.