一、文件流输出
public void byte2File(byte[] data, String fileName) {
try {
FileOutputStream output = new FileOutputStream(new File("D:\\test\\"+path));
output.write(data, 0, data.length);//将byte写入硬盘
output.close();
System.out.println("success");
} catch (Exception ex) {
ex.printStackTrace();
}
}