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