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() |
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, getUncompressedCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUncompressedCount
public 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 failspublic int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public long getCompressedCount()
getCompressedCount
in interface InputStreamStatistics
public 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"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"