public byte[] getBytes() {
        byte[] ret = new byte[buffer.size()];
        for (int i = 0; i < ret.length; i++) {
            ret[i] = buffer.get(i);
        }
        return ret;
    }
Create a copy of data in the internal buffer.

@return A copy of the data.
container-search/src/main/java/com/yahoo/search/grouping/request/RawBuffer.java