java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable, IOStatisticsSourceCompressorStream@Public @Evolving public abstract class CompressionOutputStream extends java.io.OutputStream implements IOStatisticsSource
| Modifier and Type | Field | Description |
|---|---|---|
protected java.io.OutputStream |
out |
The output stream to be compressed.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
CompressionOutputStream(java.io.OutputStream out) |
Create a compression output stream that writes
the compressed bytes to the given stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
abstract void |
finish() |
Finishes writing compressed data to the output stream
without closing the underlying stream.
|
void |
flush() |
|
IOStatistics |
getIOStatistics() |
Return any IOStatistics provided by the underlying stream.
|
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.
|
protected CompressionOutputStream(java.io.OutputStream out)
out - out.public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic abstract void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic abstract void finish()
throws java.io.IOException
java.io.IOException - raised on errors performing I/O.public abstract void resetState()
throws java.io.IOException
java.io.IOException - raised on errors performing I/O.public IOStatistics getIOStatistics()
getIOStatistics in interface IOStatisticsSourceCopyright © 2008–2025 Apache Software Foundation. All rights reserved.