Here you can find the source of saveBytes(String filename, byte[] bytes)
public static void saveBytes(String filename, byte[] bytes)
//package com.java2s; //License from project: Open Source License import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; public class Main { public static void saveBytes(String filename, byte[] bytes) { try {//from ww w . j ava2s .c o m BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(new File(filename))); out.write(bytes); out.close(); } catch (Exception exception) { exception.printStackTrace(); } } }