Java tutorial
//package com.java2s; public class Main { public static byte[] concatByteArray(byte[] a, byte[] b) { byte target[] = new byte[(short) (a.length + b.length)]; System.arraycopy(a, 0, target, 0, a.length); System.arraycopy(b, 0, target, a.length, b.length); return target; } }