Here you can find the source of writeBytesToFile(List
public static void writeBytesToFile(List<Byte> bytes, File file) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import java.util.List; public class Main { public static void writeBytesToFile(List<Byte> bytes, File file) throws Exception { OutputStream servicesf = new BufferedOutputStream(new FileOutputStream(file)); for (byte car : bytes) { servicesf.write(car);/* w w w . j a v a 2 s. c o m*/ } servicesf.close(); } }