Here you can find the source of writeBytes(byte[] bytes, String file)
public static void writeBytes(byte[] bytes, String file) throws IOException
//package com.java2s; /**//w w w.j a v a2 s. co m * This file is part of dev.utils. * * dev.utils is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * You should have received a copy of the GNU General Public License * along with dev.utils. If not, see <http://www.gnu.org/licenses/>. * * File : FileHelper.java * Created : November 28, 2006, 5:13 PM */ import java.io.FileOutputStream; import java.io.IOException; public class Main { public static void writeBytes(byte[] bytes, String file) throws IOException { FileOutputStream fos = new FileOutputStream(file); fos.write(bytes); fos.close(); } }