Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to change my file into binary data using java

File file = new File("filename.bin");
byte[] fileData = new byte[file.length()];
FileInputStream in = new FileInputStream(file);
in.read(fileData):
in.close();
// now fileData contains the bytes of the file
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #file #binary #data #java
ADD COMMENT
Topic
Name
6+9 =