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, writepublic CompressableOutputStream(OutputStream out)
out - stream to write topublic final void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionprotected void writeSingleByte(int b)
throws IOException
IOExceptionpublic final void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionprotected void writeByteArray(byte[] bytes,
int offset,
int length)
throws IOException
IOExceptionpublic void finish()
throws IOException
FinishableOutputStreamfinish in interface FinishableOutputStreamIOException - if write failspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void startCompressing()
throws IOException
IOException - if write failsCopyright © 2016. All rights reserved.