Here you can find the source of concat(byte[] b1, byte[] b2)
public static byte[] concat(byte[] b1, byte[] b2)
//package com.java2s; public class Main { public static byte[] concat(byte[] b1, byte[] b2) { byte[] b3 = new byte[b1.length + b2.length]; System.arraycopy(b1, 0, b3, 0, b1.length); System.arraycopy(b2, 0, b3, b1.length, b2.length); return b3; }/*from w w w . java 2s. c o m*/ }