Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static byte[] sysCopy(List<byte[]> srcArrays) { int len = 0; for (byte[] srcArray : srcArrays) { len += srcArray.length; } byte[] destArray = new byte[len]; int destLen = 0; for (byte[] srcArray : srcArrays) { System.arraycopy(srcArray, 0, destArray, destLen, srcArray.length); destLen += srcArray.length; } return destArray; } }