public class FramedSnappyCompressorInputStream extends CompressorInputStream implements InputStreamStatistics
Based on the "spec" in the version "Last revised: 2013-10-25"
| Constructor and Description |
|---|
FramedSnappyCompressorInputStream(java.io.InputStream in)
Constructs a new input stream that decompresses snappy-framed-compressed data from the specified input stream using the
FramedSnappyDialect.STANDARD dialect. |
FramedSnappyCompressorInputStream(java.io.InputStream in,
FramedSnappyDialect dialect)
Constructs a new input stream that decompresses snappy-framed-compressed data from the specified input stream.
|
FramedSnappyCompressorInputStream(java.io.InputStream in,
int blockSize,
FramedSnappyDialect dialect)
Constructs a new input stream that decompresses snappy-framed-compressed data from the specified input stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getCompressedCount()
Gets the amount of raw or compressed bytes read by the stream.
|
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a .sz file.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
getBytesRead, getCount, getUncompressedCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic FramedSnappyCompressorInputStream(java.io.InputStream in)
throws java.io.IOException
FramedSnappyDialect.STANDARD dialect.in - the InputStream from which to read the compressed datajava.io.IOException - if reading failspublic FramedSnappyCompressorInputStream(java.io.InputStream in,
FramedSnappyDialect dialect)
throws java.io.IOException
in - the InputStream from which to read the compressed datadialect - the dialect used by the compressed streamjava.io.IOException - if reading failspublic FramedSnappyCompressorInputStream(java.io.InputStream in,
int blockSize,
FramedSnappyDialect dialect)
throws java.io.IOException
in - the InputStream from which to read the compressed datablockSize - the block size to use for the compressed streamdialect - the dialect used by the compressed streamjava.io.IOException - if reading failsjava.lang.IllegalArgumentException - if blockSize is not bigger than 0public static boolean matches(byte[] signature,
int length)
.sz files start with a chunk with tag 0xff and content sNaPpY.
signature - the bytes to checklength - the number of bytes to checkpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic long getCompressedCount()
InputStreamStatisticsgetCompressedCount in interface InputStreamStatisticspublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionCopyright © 2010 - 2024 Adobe. All Rights Reserved