@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class CompressionOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
protected OutputStream |
out
The output stream to be compressed.
|
Modifier | Constructor and Description |
---|---|
protected |
CompressionOutputStream(OutputStream out)
Create a compression output stream that writes
the compressed bytes to the given stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
abstract void |
finish()
Finishes writing compressed data to the output stream
without closing the underlying stream.
|
void |
flush() |
abstract void |
resetState()
Reset the compression to the initial state.
|
abstract void |
write(byte[] b,
int off,
int len)
Write compressed bytes to the stream.
|
write, write
protected final OutputStream out
protected CompressionOutputStream(OutputStream out)
out
- public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public abstract void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public abstract void finish() throws IOException
IOException
public abstract void resetState() throws IOException
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.