|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.compress.DefaultCodec org.apache.hadoop.io.compress.GzipCodec
public class GzipCodec
This class creates gzip compressors/decompressors.
Nested Class Summary | |
---|---|
protected static class |
GzipCodec.GzipInputStream
|
protected static class |
GzipCodec.GzipOutputStream
A bridge that wraps around a DeflaterOutputStream to make it a CompressionOutputStream. |
Constructor Summary | |
---|---|
GzipCodec()
|
Methods inherited from class org.apache.hadoop.io.compress.DefaultCodec |
---|
getConf, setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GzipCodec()
Method Detail |
---|
public CompressionOutputStream createOutputStream(OutputStream out) throws IOException
CompressionCodec
CompressionOutputStream
that will write to the given
OutputStream
.
createOutputStream
in interface CompressionCodec
createOutputStream
in class DefaultCodec
out
- the location for the final output stream
IOException
public CompressionOutputStream createOutputStream(OutputStream out, Compressor compressor) throws IOException
CompressionCodec
CompressionOutputStream
that will write to the given
OutputStream
with the given Compressor
.
createOutputStream
in interface CompressionCodec
createOutputStream
in class DefaultCodec
out
- the location for the final output streamcompressor
- compressor to use
IOException
public Compressor createCompressor()
CompressionCodec
Compressor
for use by this CompressionCodec
.
createCompressor
in interface CompressionCodec
createCompressor
in class DefaultCodec
public Class<? extends Compressor> getCompressorType()
CompressionCodec
Compressor
needed by this CompressionCodec
.
getCompressorType
in interface CompressionCodec
getCompressorType
in class DefaultCodec
public CompressionInputStream createInputStream(InputStream in) throws IOException
CompressionCodec
createInputStream
in interface CompressionCodec
createInputStream
in class DefaultCodec
in
- the stream to read compressed bytes from
IOException
public CompressionInputStream createInputStream(InputStream in, Decompressor decompressor) throws IOException
CompressionCodec
CompressionInputStream
that will read from the given
InputStream
with the given Decompressor
.
createInputStream
in interface CompressionCodec
createInputStream
in class DefaultCodec
in
- the stream to read compressed bytes fromdecompressor
- decompressor to use
IOException
public Decompressor createDecompressor()
CompressionCodec
Decompressor
for use by this CompressionCodec
.
createDecompressor
in interface CompressionCodec
createDecompressor
in class DefaultCodec
public Class<? extends Decompressor> getDecompressorType()
CompressionCodec
Decompressor
needed by this CompressionCodec
.
getDecompressorType
in interface CompressionCodec
getDecompressorType
in class DefaultCodec
public String getDefaultExtension()
CompressionCodec
getDefaultExtension
in interface CompressionCodec
getDefaultExtension
in class DefaultCodec
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |