SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the file Object to get the length of the file to initialize your array:
int length = Long.valueOf(file.length()).intValue(); byte[] byteArray = new byte[length];