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)
| 595 | */ |
| 596 | |
| 597 | @CanIgnoreReturnValue // some processors won't return a useful result |
| 598 | public static <T> T readBytes(File file, ByteProcessor<T> processor) throws IOException { |
| 599 | return asByteSource(file).read(processor); |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * Computes the hash code of the {@code file} using {@code hashFunction}. |
nothing calls this directly
no test coverage detected