public static byte[] duplicate(byte[] array) {
        if (array == null)
            return null;
        return Arrays.copyOf(array, array.length);
    }
Copy a byte buffer into an array.  This will not affect the buffer's
position or mark.
clients/src/main/java/org/apache/kafka/common/protocol/MessageUtil.java