public class HadoopCompression extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
IO_COMPRESSION_CODEC_SNAPPY_DEFAULT_BUFFERSIZE  | 
| Constructor and Description | 
|---|
HadoopCompression()  | 
| Modifier and Type | Method and Description | 
|---|---|
static InputStream | 
getSnappyInputStream(InputStream in)
Gets a CompressionInputStream that uses the snappy codec and 
 wraps the supplied base input stream. 
 | 
static InputStream | 
getSnappyInputStream(int bufferSize,
                    InputStream in)
Gets an InputStream that uses the snappy codec and 
 wraps the supplied base input stream. 
 | 
static OutputStream | 
getSnappyOutputStream(int bufferSize,
                     OutputStream out)
Gets an OutputStream that uses the snappy codec and 
 wraps the supplied base output stream. 
 | 
OutputStream | 
getSnappyOutputStream(OutputStream out)
Gets an OutputStream that uses the snappy codec and 
 wraps the supplied base output stream. 
 | 
static boolean | 
isHadoopSnappyAvailable()
Tests whether hadoop-snappy (not to be confused with other java-based
 snappy implementations such as jsnappy or snappy-java) plus the 
 native snappy libraries are available. 
 | 
public static final int IO_COMPRESSION_CODEC_SNAPPY_DEFAULT_BUFFERSIZE
public static boolean isHadoopSnappyAvailable()
public static InputStream getSnappyInputStream(InputStream in) throws Exception
in - the base input stream to wrap aroundException - if snappy is not available or an error occurs during
 reflectionpublic static InputStream getSnappyInputStream(int bufferSize, InputStream in) throws Exception
the - buffer size for the codec to use (in bytes)in - the base input stream to wrap aroundException - if snappy is not available or an error occurs during
 reflectionpublic OutputStream getSnappyOutputStream(OutputStream out) throws Exception
the - buffer size for the codec to use (in bytes)out - the base output stream to wrap aroundException - if snappy is not available or an error occurs during
 reflectionpublic static OutputStream getSnappyOutputStream(int bufferSize, OutputStream out) throws Exception
the - buffer size for the codec to use (in bytes)out - the base output stream to wrap aroundException - if snappy is not available or an error occurs during
 reflection