@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class CompressionOutputStream extends OutputStream implements org.apache.hadoop.fs.statistics.IOStatisticsSource
| 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() |
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.
|
write, writeprotected final OutputStream out
protected CompressionOutputStream(OutputStream out)
out - public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic abstract void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic abstract void finish()
throws IOException
IOExceptionpublic abstract void resetState()
throws IOException
IOExceptionpublic IOStatistics getIOStatistics()
getIOStatistics in interface org.apache.hadoop.fs.statistics.IOStatisticsSourceCopyright © 2022 Apache Software Foundation. All rights reserved.