@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
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
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
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
Class<? extends Decompressor> getDecompressorType()
Decompressor
needed by this CompressionCodec
.Decompressor createDecompressor()
Decompressor
for use by this CompressionCodec
.String getDefaultExtension()
Copyright © 2021 Apache Software Foundation. All rights reserved.