- convert inputstream-byte-array-java
- java.io.OutputStream Example
- One of the discussion of this site is the importance of Buffering an OutputStream.
- Java - Files and I/O - Tutorialpoint
- Classe InputStream e Outputstream em Java
- Classes de entrada e saída de dados em Java
File file = new File("/temp/abc.txt");
//init array with file length
byte[] bytesArray = new byte[(int) file.length()];
FileInputStream fis = new FileInputStream(file);
fis.read(bytesArray); //read file into bytes[]
fis.close();
return bytesArray;