Package com.google.common.hash
Class ChecksumHashFunction.ChecksumHasher
java.lang.Object
com.google.common.hash.AbstractHasher
com.google.common.hash.AbstractByteHasher
com.google.common.hash.ChecksumHashFunction.ChecksumHasher
- All Implemented Interfaces:
Hasher,PrimitiveSink
- Enclosing class:
- ChecksumHashFunction
Hasher that updates a checksum.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhash()Computes a hash code based on the data that have been provided to this hasher.protected voidupdate(byte b) Updates this hasher with the given byte.protected voidupdate(byte[] bytes, int off, int len) Updates this hasher withlenbytes starting atoffin the given buffer.Methods inherited from class com.google.common.hash.AbstractByteHasher
putByte, putBytes, putBytes, putBytes, putChar, putInt, putLong, putShort, update, updateMethods inherited from class com.google.common.hash.AbstractHasher
putBoolean, putDouble, putFloat, putObject, putString, putUnencodedChars
-
Field Details
-
checksum
-
-
Constructor Details
-
ChecksumHasher
-
-
Method Details
-
update
protected void update(byte b) Description copied from class:AbstractByteHasherUpdates this hasher with the given byte.- Specified by:
updatein classAbstractByteHasher
-
update
protected void update(byte[] bytes, int off, int len) Description copied from class:AbstractByteHasherUpdates this hasher withlenbytes starting atoffin the given buffer.- Overrides:
updatein classAbstractByteHasher
-
hash
Description copied from interface:HasherComputes 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.
-