public class FramedSnappyCompressorInputStream extends CompressorInputStream implements InputStreamStatistics
Based on the "spec" in the version "Last revised: 2013-10-25"
| Constructor and Description |
|---|
FramedSnappyCompressorInputStream(InputStream in)
Constructs a new input stream that decompresses
snappy-framed-compressed data from the specified input stream
using the
FramedSnappyDialect.STANDARD dialect. |
FramedSnappyCompressorInputStream(InputStream in,
FramedSnappyDialect dialect)
Constructs a new input stream that decompresses snappy-framed-compressed data
from the specified input stream.
|
FramedSnappyCompressorInputStream(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() |
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) |
count, count, getBytesRead, getCount, getUncompressedCount, pushedBackBytesmark, markSupported, read, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUncompressedCountpublic FramedSnappyCompressorInputStream(InputStream in) throws IOException
FramedSnappyDialect.STANDARD dialect.in - the InputStream from which to read the compressed dataIOException - if reading failspublic FramedSnappyCompressorInputStream(InputStream in, FramedSnappyDialect dialect) throws IOException
in - the InputStream from which to read the compressed datadialect - the dialect used by the compressed streamIOException - if reading failspublic FramedSnappyCompressorInputStream(InputStream in, int blockSize, FramedSnappyDialect dialect) throws 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 streamIOException - if reading failspublic int read() throws IOException
read in class InputStreamIOExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int read(byte[] b, int off, int len) throws IOException
read in class InputStreamIOExceptionpublic int available() throws IOException
available in class InputStreamIOExceptionpublic long getCompressedCount()
getCompressedCount in interface InputStreamStatisticspublic 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 checkCopyright © 2018 The Apache Software Foundation. All rights reserved.