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:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.LZ4BlockInputStream(InputStream in, boolean stopOnEmptyBlock) Deprecated.UsenewBuilder()instead.LZ4BlockInputStream(InputStream in, LZ4FastDecompressor fastDecompressor) Deprecated.UsenewBuilder()instead.LZ4BlockInputStream(InputStream in, LZ4FastDecompressor fastDecompressor, Checksum checksum) Deprecated.UsenewBuilder()instead.LZ4BlockInputStream(InputStream in, LZ4FastDecompressor fastDecompressor, Checksum checksum, boolean stopOnEmptyBlock) Deprecated.UsenewBuilder()instead. -
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
@Deprecated public LZ4BlockInputStream(InputStream in, LZ4FastDecompressor fastDecompressor, Checksum checksum, boolean stopOnEmptyBlock) Deprecated.UsenewBuilder()instead.Creates a new LZ4 input stream to read from the specified underlying InputStream.- Parameters:
in- theInputStreamto pollfastDecompressor- theLZ4FastDecompressorinstance 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
@Deprecated public LZ4BlockInputStream(InputStream in, LZ4FastDecompressor fastDecompressor, Checksum checksum) Deprecated.UsenewBuilder()instead.Creates a new LZ4 input stream to read from the specified underlying InputStream.- Parameters:
in- theInputStreamto pollfastDecompressor- theLZ4FastDecompressorinstance to usechecksum- theChecksuminstance to use, must be equivalent to the instance which has been used to write the stream- See Also:
-
LZ4BlockInputStream
Deprecated.UsenewBuilder()instead.Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.- Parameters:
in- theInputStreamto pollfastDecompressor- theLZ4FastDecompressorinstance to use- See Also:
-
LZ4BlockInputStream
Deprecated.UsenewBuilder()instead.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
Deprecated.UsenewBuilder()instead.Creates a new LZ4 input stream to read from the specified underlying InputStream, usingXXHash32for checksuming.- Parameters:
in- theInputStreamto poll- See Also:
-
-
Method Details
-
newBuilder
Creates a new LZ4 block input stream builder. The following are defaults:- decompressor -
LZ4Factory.fastestInstance().safeDecompressor() - checksum -
XXHash32 - stopOnEmptyBlock -
true
- Returns:
- new instance of
LZ4BlockInputStream.Builderto be used to configure and build new LZ4 input stream
- decompressor -
-
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
-
newBuilder()instead.