Here you can find the source of addBytes(byte[] src1, byte[] src2)
public static byte[] addBytes(byte[] src1, byte[] src2)
//package com.java2s; public class Main { public static byte[] addBytes(byte[] src1, byte[] src2) { byte[] dest = new byte[src1.length + src2.length]; System.arraycopy(src1, 0, dest, 0, src1.length); System.arraycopy(src2, 0, dest, src1.length, src2.length); return dest; }/*from w w w . ja v a2s .com*/ }