Here you can find the source of save(byte[] data, String path)
private final static void save(byte[] data, String path) throws IOException
//package com.java2s; //License from project: BSD License import java.io.IOException; import java.io.FileOutputStream; import java.io.File; public class Main { private final static void save(byte[] data, String path) throws IOException { File f = new File(path); File p = f.getParentFile(); if ((p != null) && (!p.isDirectory())) { p.mkdirs();//from ww w .j av a2s .c o m } FileOutputStream fout = new FileOutputStream(f); fout.write(data); fout.close(); } }