Here you can find the source of writeBytes(File f, byte[] b)
public static boolean writeBytes(File f, byte[] b)
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static boolean writeBytes(String fileName, byte[] b) { return writeBytes(new File(fileName), b); }/* w ww . j ava2s.c om*/ public static boolean writeBytes(File f, byte[] b) { BufferedOutputStream bos = null; try { bos = new BufferedOutputStream(new FileOutputStream(f)); bos.write(b); return true; } catch (Exception e) { e.printStackTrace(); return false; } finally { if (bos != null) { try { bos.close(); } catch (IOException e) { e.printStackTrace(); } } } } }