Class ChecksumHashFunction.ChecksumHasher

All Implemented Interfaces:
Hasher, PrimitiveSink
Enclosing class:
ChecksumHashFunction

private final class ChecksumHashFunction.ChecksumHasher extends AbstractByteHasher
Hasher that updates a checksum.
  • Field Details

    • checksum

      private final Checksum checksum
  • Constructor Details

    • ChecksumHasher

      private ChecksumHasher(Checksum checksum)
  • Method Details

    • update

      protected void update(byte b)
      Description copied from class: AbstractByteHasher
      Updates this hasher with the given byte.
      Specified by:
      update in class AbstractByteHasher
    • update

      protected void update(byte[] bytes, int off, int len)
      Description copied from class: AbstractByteHasher
      Updates this hasher with len bytes starting at off in the given buffer.
      Overrides:
      update in class AbstractByteHasher
    • update

      protected void update(ByteBuffer b)
      Description copied from class: AbstractByteHasher
      Updates this hasher with bytes from the given buffer.
      Overrides:
      update in class AbstractByteHasher
    • hash

      public HashCode hash()
      Description copied from interface: Hasher
      Computes a hash code based on the data that have been provided to this hasher. The result is unspecified if this method is called more than once on the same instance.