Class ChecksumCalculatingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.compress.utils.ChecksumCalculatingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Calculates the checksum of the data read.
- Since:
- 1.14
- This class is not thread-safe
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset
-
Constructor Details
-
ChecksumCalculatingInputStream
-
-
Method Details
-
getValue
Returns the calculated checksum.- Returns:
- the calculated checksum.
-
read
Reads a single byte from the stream- Overrides:
read
in classFilterInputStream
- Throws:
IOException
- if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected value
-
read
Reads from the stream into a byte array.- Overrides:
read
in classFilterInputStream
- Throws:
IOException
- if the underlying stream throws or the stream is exhausted and the Checksum doesn't match the expected value
-
skip
- Overrides:
skip
in classFilterInputStream
- Throws:
IOException
-