Java tutorial
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static byte[] list2buffer(List<Byte> list) { byte[] buffer = new byte[list.size()]; for (int i = 0; i < list.size(); i++) { buffer[i] = list.get(i); } return buffer; } }