Class HashingInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.google.common.hash.HashingInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

@Beta public final class HashingInputStream extends FilterInputStream
An InputStream that maintains a hash of the data read from it.
Since:
16.0
Author:
Qian Huang
  • Constructor Details

    • HashingInputStream

      public HashingInputStream(HashFunction hashFunction, InputStream in)
      Creates an input stream that hashes using the given HashFunction and delegates all data read from it to the underlying InputStream.

      The InputStream should not be read from before or after the hand-off.

  • Method Details