Here you can find the source of mergeArray(byte[] arr1, byte[] arr2)
public static byte[] mergeArray(byte[] arr1, byte[] arr2)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] mergeArray(byte[] arr1, byte[] arr2) { byte[] result = new byte[arr1.length + arr2.length]; for (int i = 0; i < arr1.length; i++) result[i] = arr1[i];/* w ww . j a v a2s.c o m*/ for (int i = 0; i < arr2.length; i++) result[i + arr1.length] = arr2[i]; return result; } }