Here you can find the source of join(byte[] a1, byte[] a2)
static public byte[] join(byte[] a1, byte[] a2)
//package com.java2s; public class Main { static public byte[] join(byte[] a1, byte[] a2) { byte[] result = new byte[a1.length + a2.length]; System.arraycopy(a1, 0, result, 0, a1.length); System.arraycopy(a2, 0, result, a1.length, a2.length); return result; }/*from ww w . j ava 2s. c om*/ static public int[] join(int[] a1, int[] a2) { int[] result = new int[a1.length + a2.length]; System.arraycopy(a1, 0, result, 0, a1.length); System.arraycopy(a2, 0, result, a1.length, a2.length); return result; } }