public class FramedSnappyCompressorInputStream extends CompressorInputStream
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
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, pushedBackBytespublic FramedSnappyCompressorInputStream(java.io.InputStream in)
throws java.io.IOException
in - the InputStream from which to read the compressed datajava.io.IOExceptionpublic int read()
throws java.io.IOException
read 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 int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic 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 check