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

Method readBytes

corpus/java/training/guava/io/Files.java:567–570  ·  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

565 * @throws IOException if an I/O error occurs
566 */
567 @CanIgnoreReturnValue // some processors won't return a useful result
568 public static <T> T readBytes(File file, ByteProcessor<T> processor) throws IOException {
569 return asByteSource(file).read(processor);
570 }
571
572 /**
573 * 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