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

Method write

app/src/main/java/com/github/catvod/utils/Path.java:78–89  ·  view source on GitHub ↗
(File file, byte[] data)

Source from the content-addressed store, hash-verified

76 }
77
78 public static File write(File file, byte[] data) {
79 try {
80 FileOutputStream fos = new FileOutputStream(create(file));
81 fos.write(data);
82 fos.flush();
83 fos.close();
84 return file;
85 } catch (IOException e) {
86 e.printStackTrace();
87 return file;
88 }
89 }
90
91 public static void move(File in, File out) {
92 if (in.renameTo(out)) return;

Callers 3

readToByteMethod · 0.80
copyMethod · 0.80
downloadMethod · 0.80

Calls 1

createMethod · 0.95

Tested by

no test coverage detected