Here you can find the source of writeBytes(File file, byte[] ba)
public static void writeBytes(File file, byte[] ba) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileOutputStream; import java.io.IOException; public class Main { public static void writeBytes(File file, byte[] ba) throws IOException { FileOutputStream a = null; try {// ww w .jav a 2 s .c om a = new FileOutputStream(file); a.write(ba); } finally { if (a != null) { a.close(); } } } }