All pastes #245113 Raw Edit

Untitled

public text v1 · immutable
#245113 ·published 2006-11-10 16:56 UTC
rendered paste body
    /**
    * 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;
    }