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

Method write

catvod/src/main/java/com/github/catvod/utils/Path.java:176–185  ·  view source on GitHub ↗
(File file, InputStream is)

Source from the content-addressed store, hash-verified

174 }
175
176 public static File write(File file, InputStream is) {
177 try (InputStream input = is; FileOutputStream output = new FileOutputStream(create(file))) {
178 int read;
179 byte[] buffer = new byte[16384];
180 while ((read = input.read(buffer)) != -1) output.write(buffer, 0, read);
181 return file;
182 } catch (IOException e) {
183 return file;
184 }
185 }
186
187 public static File write(File file, byte[] data) {
188 try (FileOutputStream fos = new FileOutputStream(create(file))) {

Callers 7

writeMethod · 0.95
importFromMethod · 0.95
backupMethod · 0.95
writeFileFunction · 0.45
transferStreamMethod · 0.45
readToByteMethod · 0.45
copyMethod · 0.45

Calls 2

createMethod · 0.95
readMethod · 0.45

Tested by

no test coverage detected