Here you can find the source of addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray)
static public boolean addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray)
//package com.java2s; //License from project: Open Source License public class Main { static public boolean addArrayToArray(byte[] baseArray, int startIndex, byte[] newArray) { if (startIndex + newArray.length > baseArray.length) return false; for (int i = 0; i < newArray.length; i++) baseArray[startIndex + i] = newArray[i]; return true; }/* w w w . ja v a 2 s .c om*/ }