MCPcopy Create free account
hub / github.com/FongMi/TV / readToByte

Method readToByte

catvod/src/main/java/com/github/catvod/utils/Path.java:159–165  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

157 }
158
159 public static byte[] readToByte(File file) {
160 try (FileInputStream is = new FileInputStream(file)) {
161 return readToByte(is);
162 } catch (IOException e) {
163 return new byte[0];
164 }
165 }
166
167 private static byte[] readToByte(InputStream is) throws IOException {
168 try (InputStream input = is; ByteArrayOutputStream bos = new ByteArrayOutputStream()) {

Callers 1

readMethod · 0.95

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected