Class ChecksumInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class ChecksumInputStream
    extends FilterInputStream
    A ChecksumInputStream that computes and verifies a checksum for the data read from the stream.

    Supports CRC32C, SHA-256, SHA-384, and MD5 algorithms.

    Checksum verification is performed before the last byte is read. If the computed checksum does not match the expected checksum, an IOException is thrown.