Here you can find the source of byteArrayListToByteArray(ArrayList
public static byte[] byteArrayListToByteArray(ArrayList<Byte> indata)
//package com.java2s; //License from project: Creative Commons License import java.util.ArrayList; public class Main { public static byte[] byteArrayListToByteArray(ArrayList<Byte> indata) { byte[] temp = new byte[indata.size()]; for (int i = 0; i < temp.length; i++) temp[i] = (byte) indata.get(i).byteValue(); return temp; }/* w ww .j a v a 2 s . com*/ }