MCPcopy
hub / github.com/google/guava / hash

Method hash

android/guava/src/com/google/common/io/ByteSource.java:337–341  ·  view source on GitHub ↗

Hashes the contents of this byte source using the given hash function. @throws IOException if an I/O error occurs while reading from this source

(HashFunction hashFunction)

Source from the content-addressed store, hash-verified

335 * @throws IOException if an I/O error occurs while reading from this source
336 */
337 public HashCode hash(HashFunction hashFunction) throws IOException {
338 Hasher hasher = hashFunction.newHasher();
339 copyTo(Funnels.asOutputStream(hasher));
340 return hasher.hash();
341 }
342
343 /**
344 * Checks that the contents of this byte source are equal to the contents of the given byte

Callers

nothing calls this directly

Calls 4

copyToMethod · 0.95
asOutputStreamMethod · 0.95
hashMethod · 0.95
newHasherMethod · 0.65

Tested by

no test coverage detected