Here you can find the source of writeFile(byte[] outputBytes, String outputFile)
public static void writeFile(byte[] outputBytes, String outputFile) throws FileNotFoundException, IOException
//package com.java2s; //License from project: Open Source License import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; public class Main { public static void writeFile(byte[] outputBytes, String outputFile) throws FileNotFoundException, IOException { OutputStream os = new FileOutputStream(outputFile); os.write(outputBytes);//from ww w . j ava 2 s. c om os.flush(); os.close(); } }