lundi 26 mai 2014

How to write multiple byte arrays to a file?


Vote count:

0




I did find some stackoverflow questions which answer this question, but only for one byte array. A modification of one of the code samples I found:



byte[] array1 = new byte[100]
byte[] array2 = new byte[100]
FileOutputStream output = new FileOutputStream(new File("target-file"));
IOUtils.write(array1, output);
IOUtils.write(array2, output);


Something like this? I want to store 100+ byte arrays to a file. How can I achieve this?



asked 28 secs ago






Aucun commentaire:

Enregistrer un commentaire