Here you can find the source of mergeByteArrays(byte[] one, byte[] two)
public static byte[] mergeByteArrays(byte[] one, byte[] two)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] mergeByteArrays(byte[] one, byte[] two) { byte[] result = new byte[one.length + two.length]; System.arraycopy(one, 0, result, 0, one.length); System.arraycopy(two, 0, result, one.length, two.length); return result; }//w w w. ja v a 2 s . co m }