Reads all bytes from a file into a byte array. @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 largest possible byte array (2^31 - 1) @throws IOException if an I/O error occurs
(File file)
| 254 | |
| 255 | |
| 256 | public static byte[] toByteArray(File file) throws IOException { |
| 257 | return asByteSource(file).read(); |
| 258 | } |
| 259 | |
| 260 | /** |
| 261 | * Reads all characters from a file into a {@link String}, using the given character set. |
nothing calls this directly
no test coverage detected