Class MessageDigestInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

This class is an example for using an ObservableInputStream. It creates its own ObservableInputStream.Observer, which calculates a checksum using a MessageDigest, for example, a SHA-512 sum.

To build an instance, use MessageDigestInputStream.Builder.

See the MessageDigest section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard algorithm names.

You must specify a message digest algorithm name or instance.

Note: Neither ObservableInputStream, nor MessageDigest, are thread safe, so is MessageDigestInputStream.

Since:
2.15.0
See Also: