Here you can find the source of concat(byte[] base, byte... extension)
public static byte[] concat(byte[] base, byte... extension)
//package com.java2s; public class Main { public static int[] concat(int[] base, int... extension) { int[] compound = new int[base.length + extension.length]; System.arraycopy(base, 0, compound, 0, base.length); System.arraycopy(extension, 0, compound, base.length, extension.length);/*from ww w. j a va 2s . c o m*/ return compound; } public static byte[] concat(byte[] base, byte... extension) { byte[] compound = new byte[base.length + extension.length]; System.arraycopy(base, 0, compound, 0, base.length); System.arraycopy(extension, 0, compound, base.length, extension.length); return compound; } }