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

Method readBytes

output/java_guava/1.4.19/Files.java:598–601  ·  view source on GitHub ↗

Process the bytes of a file. (If this seems too complicated, maybe you're looking for #toByteArray.) @param file the file to read @param processor the object to which the bytes of the file are passed. @return the result of the byte processor @throws IOException if an I/O error occurs

(File file, ByteProcessor<T> processor)

Source from the content-addressed store, hash-verified

596 */
597
598 @CanIgnoreReturnValue // some processors won't return a useful result
599 public static <T> T readBytes(File file, ByteProcessor<T> processor) throws IOException {
600 return asByteSource(file).read(processor);
601 }
602
603 /**
604 * Computes the hash code of the {@code file} using {@code hashFunction}.

Callers

nothing calls this directly

Calls 2

asByteSourceMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected