@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, write
protected final OutputStream out
protected CompressionOutputStream(OutputStream out)
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
- raised on errors performing I/O.public abstract void resetState() throws IOException
IOException
- raised on errors performing I/O.public IOStatistics getIOStatistics()
getIOStatistics
in interface org.apache.hadoop.fs.statistics.IOStatisticsSource
Copyright © 2023 Apache Software Foundation. All rights reserved.