Here you can find the source of toFile(byte[] bFile)
public static void toFile(byte[] bFile)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static void toFile(byte[] bFile) { try {/* w w w . ja v a2 s. c o m*/ //convert file into array of bytes //convert array of bytes into file FileOutputStream fileOuputStream = new FileOutputStream("C:\\testing2.png"); fileOuputStream.write(bFile); fileOuputStream.close(); System.out.println("Done"); } catch (Exception e) { e.printStackTrace(); } } }