Here you can find the source of writeFile(String filename, byte data[])
static public void writeFile(String filename, byte data[]) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.FileOutputStream; import java.io.IOException; public class Main { static public void writeFile(String filename, byte data[]) throws IOException { FileOutputStream fout = new FileOutputStream(filename); fout.write(data);/*from w w w .j a v a2s . co m*/ fout.close(); } }