@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface CompressionCodec
CompressionOutputStream createOutputStream(OutputStream out) throws IOException
CompressionOutputStream
that will write to the given
OutputStream
.out
- the location for the final output streamIOException
- raised on errors performing I/O.CompressionOutputStream createOutputStream(OutputStream out, Compressor compressor) throws IOException
CompressionOutputStream
that will write to the given
OutputStream
with the given Compressor
.out
- the location for the final output streamcompressor
- compressor to useIOException
- raised on errors performing I/O.Class<? extends Compressor> getCompressorType()
Compressor
needed by this CompressionCodec
.Compressor createCompressor()
Compressor
for use by this CompressionCodec
.CompressionInputStream createInputStream(InputStream in) throws IOException
CompressionInputStream
that will read from the given
input stream.in
- the stream to read compressed bytes fromIOException
- raised on errors performing I/O.CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException
CompressionInputStream
that will read from the given
InputStream
with the given Decompressor
.in
- the stream to read compressed bytes fromdecompressor
- decompressor to useIOException
- raised on errors performing I/O.Class<? extends Decompressor> getDecompressorType()
Decompressor
needed by this CompressionCodec
.Decompressor createDecompressor()
Decompressor
for use by this CompressionCodec
.String getDefaultExtension()
Copyright © 2023 Apache Software Foundation. All rights reserved.