Posted By

dalcacer on 10/27/10


Tagged

toFile


Versions (?)

byte-Array to File


 / Published in: Java
 

  1. /**
  2.   * Writes an byte array into a file.
  3.   * @param data Data that should be written into a file.
  4.   * @param filename The file, that should be used.
  5.   * @throws IOException
  6.   */
  7. public static void writeByte2File(byte[] data, String filename) throws IOException {
  8. OutputStream out = new FileOutputStream(filename);
  9. out.write(data);
  10. out.close();
  11. }

Report this snippet  

You need to login to post a comment.