public final void clear() {
        buffer.clear();
        mark = -1;
    }
Behaves as ByteBuffer slicing, but the internal buffer will no longer be
shared if one of the buffers is forced to grow.

@return a new buffer with shared contents
@see ByteBuffer#slice()
vespajlib/src/main/java/com/yahoo/io/GrowableByteBuffer.java