Here you can find the source of addBytes(byte[][] src)
public static byte[] addBytes(byte[][] src)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] addBytes(byte[][] src) { int length = 0; for (int i = 0; i < src.length; i++) { if (src[i] != null) length += src[i].length; }//from w w w . j a v a 2 s . co m byte[] score = new byte[length]; int index = 0; for (int i = 0; i < src.length; i++) { if (src[i] != null) { System.arraycopy(src[i], 0, score, index, src[i].length); index += src[i].length; } } src = (byte[][]) null; return score; } }