MCPcopy
hub / github.com/google/guava / toByteArray

Method toByteArray

android/guava/src/com/google/common/io/Resources.java:94–96  ·  view source on GitHub ↗

Reads all bytes from a URL into a byte array. @param url the URL to read from @return a byte array containing all the bytes from the URL @throws IOException if an I/O error occurs

(URL url)

Source from the content-addressed store, hash-verified

92 * @throws IOException if an I/O error occurs
93 */
94 public static byte[] toByteArray(URL url) throws IOException {
95 return asByteSource(url).read();
96 }
97
98 /**
99 * Reads all characters from a URL into a {@link String}, using the given character set.

Callers 1

testToByteArrayMethod · 0.95

Calls 2

asByteSourceMethod · 0.95
readMethod · 0.45

Tested by 1

testToByteArrayMethod · 0.76