public static byte[] concat(byte[] a1, byte[] a2) {
        byte[] result = Arrays.copyOf(a1, a1.length + a2.length);
        System.arraycopy(a2, 0, result, a1.length, a2.length);
        return result;
    }
Checks that the range described by {@code offset} and {@code count}
doesn't exceed {@code arrayLength}.
common/src/main/java/org/conscrypt/ArrayUtils.java