public final class LZ4BlockInputStream
extends java.io.FilterInputStream
InputStream
implementation to decode data written with
LZ4BlockOutputStream
. This class is not thread-safe and does not
support mark(int)
/reset()
.This is based on net.jpountz.lz4.LZ4BlockInputStream
changes: https://github.com/davies/lz4-java/commit/cc1fa940ac57cc66a0b937300f805d37e2bf8411
TODO: merge this into upstream
Constructor and Description |
---|
LZ4BlockInputStream(java.io.InputStream in)
Create a new instance which uses the fastest
LZ4FastDecompressor available. |
LZ4BlockInputStream(java.io.InputStream in,
net.jpountz.lz4.LZ4FastDecompressor decompressor)
Create a new instance using
XXHash32 for checksuming. |
LZ4BlockInputStream(java.io.InputStream in,
net.jpountz.lz4.LZ4FastDecompressor decompressor,
java.util.zip.Checksum checksum)
Create a new
InputStream . |
public LZ4BlockInputStream(java.io.InputStream in, net.jpountz.lz4.LZ4FastDecompressor decompressor, java.util.zip.Checksum checksum)
InputStream
.in
- the InputStream
to polldecompressor
- the decompressor
instance to
usechecksum
- the Checksum
instance to use, must be
equivalent to the instance which has been used to
write the streampublic LZ4BlockInputStream(java.io.InputStream in, net.jpountz.lz4.LZ4FastDecompressor decompressor)
XXHash32
for checksuming.LZ4BlockInputStream(InputStream, LZ4FastDecompressor, Checksum)
,
StreamingXXHash32.asChecksum()
public LZ4BlockInputStream(java.io.InputStream in)
LZ4FastDecompressor
available.LZ4Factory.fastestInstance()
,
LZ4BlockInputStream(InputStream, LZ4FastDecompressor)
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
public void mark(int readlimit)
mark
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
java.io.IOException
public String toString()
toString
in class Object