Package net.jpountz.lz4
Class LZ4BlockInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
net.jpountz.lz4.LZ4BlockInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
InputStream implementation to decode data written with
LZ4BlockOutputStream. This class is not thread-safe and does not
support mark(int)/reset().- See Also:
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.LZ4BlockInputStream(InputStream in, boolean stopOnEmptyBlock) Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.LZ4BlockInputStream(InputStream in, LZ4FastDecompressor decompressor) Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.LZ4BlockInputStream(InputStream in, LZ4FastDecompressor decompressor, Checksum checksum) Creates a new LZ4 input stream to read from the specified underlying InputStream.LZ4BlockInputStream(InputStream in, LZ4FastDecompressor decompressor, Checksum checksum, boolean stopOnEmptyBlock) Creates a new LZ4 input stream to read from the specified underlying InputStream. -
Method Summary
Methods inherited from class java.io.FilterInputStream
closeMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
LZ4BlockInputStream
public LZ4BlockInputStream(InputStream in, LZ4FastDecompressor decompressor, Checksum checksum, boolean stopOnEmptyBlock) Creates a new LZ4 input stream to read from the specified underlying InputStream.- 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
Creates a new LZ4 input stream to read from the specified underlying InputStream.- Parameters:
in- theInputStreamto polldecompressor- thedecompressorinstance to usechecksum- theChecksuminstance to use, must be equivalent to the instance which has been used to write the stream- See Also:
-
LZ4BlockInputStream
Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.- Parameters:
in- theInputStreamto polldecompressor- thedecompressorinstance to use- See Also:
-
LZ4BlockInputStream
Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.- Parameters:
in- theInputStreamto pollstopOnEmptyBlock- whether read is stopped on an empty block- See Also:
-
LZ4BlockInputStream
Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.- Parameters:
in- theInputStreamto poll- See Also:
-
-
Method Details
-
available
- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classFilterInputStream
-
mark
public void mark(int readlimit) - Overrides:
markin classFilterInputStream
-
reset
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
toString
-