/** * Combine two byte arrays * * @param l * first byte array * @param r * second byte array * @return byte[] combined byte array */ public static byte[] concatenate(byte[] l, byte[] r) { byte[] b = new byte[l.length + r.length]; System.arraycopy(l, 0, b, 0, l.length); System.arraycopy(r, 0, b, l.length, r.length); return b; }