net.jpountz.lz4
Class LZ4BlockInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- net.jpountz.lz4.LZ4BlockInputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
public final class LZ4BlockInputStream extends java.io.FilterInputStreamInputStreamimplementation to decode data written withLZ4BlockOutputStream. This class is not thread-safe and does not supportmark(int)/reset().- See Also:
LZ4BlockOutputStream
-
-
Constructor Summary
Constructors Constructor and Description LZ4BlockInputStream(java.io.InputStream in)Create a new instance which uses the fastestLZ4FastDecompressoravailable.LZ4BlockInputStream(java.io.InputStream in, boolean stopOnEmptyBlock)Create a new instance usingXXHash32for checksuming.LZ4BlockInputStream(java.io.InputStream in, LZ4FastDecompressor decompressor)Create a new instance usingXXHash32for checksuming.LZ4BlockInputStream(java.io.InputStream in, LZ4FastDecompressor decompressor, java.util.zip.Checksum checksum)Create a new instance usingXXHash32for checksuming.LZ4BlockInputStream(java.io.InputStream in, LZ4FastDecompressor decompressor, java.util.zip.Checksum checksum, boolean stopOnEmptyBlock)Create a newInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intavailable()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()longskip(long n)java.lang.StringtoString()
-
-
-
Constructor Detail
-
LZ4BlockInputStream
public LZ4BlockInputStream(java.io.InputStream in, LZ4FastDecompressor decompressor, java.util.zip.Checksum checksum, boolean stopOnEmptyBlock)Create a newInputStream.- Parameters:
in- theInputStreamto polldecompressor- thedecompressorinstance to usechecksum- theChecksuminstance to use, must be equivalent to the instance which has been used to write the streamstopOnEmptyBlock- whether read is stopped on an empty block
-
LZ4BlockInputStream
public LZ4BlockInputStream(java.io.InputStream in, LZ4FastDecompressor decompressor, java.util.zip.Checksum checksum)Create a new instance usingXXHash32for checksuming.
-
LZ4BlockInputStream
public LZ4BlockInputStream(java.io.InputStream in, LZ4FastDecompressor decompressor)Create a new instance usingXXHash32for checksuming.
-
LZ4BlockInputStream
public LZ4BlockInputStream(java.io.InputStream in, boolean stopOnEmptyBlock)Create a new instance usingXXHash32for checksuming.
-
LZ4BlockInputStream
public LZ4BlockInputStream(java.io.InputStream in)
Create a new instance which uses the fastestLZ4FastDecompressoravailable.
-
-
Method Detail
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.FilterInputStream
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.FilterInputStream
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG