MCPcopy Create free account
hub / github.com/ReZeroS/git / getFileAsBytes

Method getFileAsBytes

src/main/java/club/qqtim/util/FileUtil.java:195–202  ·  view source on GitHub ↗

convert file content to byte[]

(File file)

Source from the content-addressed store, hash-verified

193 * convert file content to byte[]
194 */
195 public static byte[] getFileAsBytes(File file){
196 try {
197 return Files.toByteArray(file);
198 } catch (IOException e) {
199 log.error(e.toString());
200 }
201 return null;
202 }
203
204
205 public static Stream<Path> walk(Path start, int maxDepth, FileVisitOption... options) throws IOException {

Callers 2

getWorkingTreeMethod · 0.95
doHashObjectMethod · 0.95

Calls 2

errorMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected