class BytesUtils {

  public static byte[] concatByteArrayList(List<byte[]> list) {
    int size = list.size();
    int len = 0;
    for (byte[] cs : list) {
      len += cs.length;
    }
    byte[] result = new byte[len];
    int pos = 0;
    for (int i = 0; i < size; i++) {
      int l = list.get(i).length;
      System.arraycopy(list.get(i), 0, result, pos, l);
      pos += l;
    }
    return result;
  }

  private  BytesUtils();

}