Here you can find the source of concat(byte[] b1, byte[] b2)
public static byte[] concat(byte[] b1, byte[] b2)
//package com.java2s; //License from project: LGPL public class Main { public static byte[] concat(byte[] b1, byte[] b2) { byte[] ret = new byte[b1.length + b2.length]; System.arraycopy(b1, 0, ret, 0, b1.length); System.arraycopy(b2, 0, ret, b1.length, b2.length); return ret; }/*from w w w . ja v a 2 s . co m*/ }