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)
| 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}. |
nothing calls this directly
no test coverage detected