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, usingXXHash32
for checksuming.LZ4BlockInputStream
(InputStream in, boolean stopOnEmptyBlock) Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32
for checksuming.LZ4BlockInputStream
(InputStream in, LZ4FastDecompressor decompressor) Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32
for 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
close
Methods 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
- theInputStream
to polldecompressor
- thedecompressor
instance to usechecksum
- theChecksum
instance 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
- theInputStream
to polldecompressor
- thedecompressor
instance to usechecksum
- theChecksum
instance 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, usingXXHash32
for checksuming.- Parameters:
in
- theInputStream
to polldecompressor
- thedecompressor
instance to use- See Also:
-
LZ4BlockInputStream
Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32
for checksuming.- Parameters:
in
- theInputStream
to 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, usingXXHash32
for checksuming.- Parameters:
in
- theInputStream
to poll- See Also:
-
-
Method Details
-
available
- Overrides:
available
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classFilterInputStream
-
mark
public void mark(int readlimit) - Overrides:
mark
in classFilterInputStream
-
reset
- Overrides:
reset
in classFilterInputStream
- Throws:
IOException
-
toString
-