java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.util.zip.CheckedInputStream
kala.compress.utils.ChecksumVerifyingInputStream
kala.compress.utils.CRC32VerifyingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
A stream that verifies the CRC of the data read once the stream is exhausted.
- Since:
- 1.6
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionCRC32VerifyingInputStream(InputStream in, long size, int expectedCrc32) Constructs a new instance.CRC32VerifyingInputStream(InputStream in, long size, long expectedCrc32) Constructs a new instance. -
Method Summary
Methods inherited from class kala.compress.utils.ChecksumVerifyingInputStream
getBytesRemaining, read, readMethods inherited from class java.util.zip.CheckedInputStream
getChecksum, skipMethods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, resetMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
CRC32VerifyingInputStream
Constructs a new instance.- Parameters:
in- the stream to wrapsize- the of the stream's contentexpectedCrc32- the expected checksum
-
CRC32VerifyingInputStream
Constructs a new instance.- Parameters:
in- the stream to wrapsize- the of the stream's contentexpectedCrc32- the expected checksum- Since:
- 1.7
-