Class ChecksumInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public final class ChecksumInputStream extends CountingInputStream
Automatically verifies a Checksum value once the stream is exhausted or the count threshold is reached.

If the Checksum does not meet the expected value when exhausted, then the input stream throws an IOException.

If you do not need the verification or threshold feature, then use a plain CheckedInputStream.

To build an instance, use ChecksumInputStream.Builder.

Since:
2.16.0
See Also: