Here you can find the source of arrayConcat(final byte[] firstArray, final byte[] secondArray)
public static byte[] arrayConcat(final byte[] firstArray, final byte[] secondArray)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] arrayConcat(final byte[] firstArray, final byte[] secondArray) { final int aLen = firstArray.length; final int bLen = secondArray.length; final byte[] combinedArray = new byte[aLen + bLen]; System.arraycopy(firstArray, 0, combinedArray, 0, aLen); System.arraycopy(secondArray, 0, combinedArray, aLen, bLen); return combinedArray; }/*from w ww . ja v a 2 s . co m*/ }