Here you can find the source of save(byte[] bs, String fn)
public static void save(byte[] bs, String fn) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; public class Main { public static void save(byte[] bs, String fn) throws IOException { new File(fn).getParentFile().mkdirs(); BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(fn)); out.write(bs);/*w w w . jav a 2s .com*/ out.close(); } }