Answers for "how to convert file to byte[] in java"

0

how to convert file to byte[] in java

import java.io.File;
import java.nio.file.Files;

File file;
// ...(file is initialised)...
byte[] fileContent = Files.readAllBytes(file.toPath());
Posted by: Guest on August-22-2021

Code answers related to "how to convert file to byte[] in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language