Here you can find the source of writeFileBinary(String filename, byte[]... dataArrays)
public static void writeFileBinary(String filename, byte[]... dataArrays) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static void writeFileBinary(String filename, byte[]... dataArrays) throws IOException { DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename))); for (byte[] data : dataArrays) { dos.write(data);/*w w w . j av a2 s . co m*/ } dos.flush(); dos.close(); } }