MCPcopy Create free account
hub / github.com/antlr/codebuff / hash

Method hash

output/java_guava/1.4.17/Files.java:613–615  ·  view source on GitHub ↗

Computes the hash code of the file using hashFunction. @param file the file to read @param hashFunction the hash function to use to hash the data @return the HashCode of all of the bytes in the file @throws IOException if an I/O error occurs @since 12.0

(File file, HashFunction hashFunction)

Source from the content-addressed store, hash-verified

611
612
613 public static HashCode hash(File file, HashFunction hashFunction) throws IOException {
614 return asByteSource(file).hash(hashFunction);
615 }
616
617 /**
618 * Fully maps a file read-only in to memory as per

Callers

nothing calls this directly

Calls 2

asByteSourceMethod · 0.95
hashMethod · 0.65

Tested by

no test coverage detected