Here you can find the source of writeBytes(File aFile, byte theBytes[])
public static void writeBytes(File aFile, byte theBytes[]) throws IOException
//package com.java2s; import java.io.*; public class Main { /**/*from ww w . j av a2 s.c o m*/ * Writes the given bytes (within the specified range) to the given file. */ public static void writeBytes(File aFile, byte theBytes[]) throws IOException { if (theBytes == null) { aFile.delete(); return; } FileOutputStream fileStream = new FileOutputStream(aFile); fileStream.write(theBytes); fileStream.close(); } }