Reads all bytes from a file into a byte array. <p><b>{@link java.nio.file.Path} equivalent:</b> {@link java.nio.file.Files#readAllBytes}. @param file the file to read from @return a byte array containing all the bytes from file @throws IllegalArgumentException if the file is bigger than the larges
(File file)
| 234 | * @throws IOException if an I/O error occurs |
| 235 | */ |
| 236 | public static byte[] toByteArray(File file) throws IOException { |
| 237 | return asByteSource(file).read(); |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * Reads all characters from a file into a {@link String}, using the given character set. |
nothing calls this directly
no test coverage detected