Here you can find the source of writeFile(byte[] data, String filePath)
public static void writeFile(byte[] data, String filePath) throws Exception
//package com.java2s; //License from project: Apache License import java.io.File; import java.io.FileOutputStream; public class Main { public static void writeFile(byte[] data, String filePath) throws Exception { FileOutputStream fos = new FileOutputStream(new File(filePath)); fos.write(data);/* w ww . j a v a 2 s. co m*/ fos.close(); } }