MCPcopy Index your code
hub / github.com/antlr/codebuff / toByteArray

Method toByteArray

output/java_guava/1.4.16/Files.java:256–258  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

asByteSourceMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected