@Override
    public synchronized void reset() throws IOException {
        if (marked == null) {
            throw new IOException("mark has not been called, or too much has been read since marked.");
        }
        var remainingInCurrent = currBuf == null ? 0 : currBuf.remaining();
        ByteBuffer newBuf = ByteBuffer.allocate(readSinceMarked + remainingInCurrent);
        newBuf.put(marked, 0, readSinceMarked);
        if (remainingInCurrent > 0) newBuf.put(currBuf);
        newBuf.flip();
        currBuf = newBuf;
        marked = null;
    }
<p>Constructs a new ContentInputStream that reads from the given {@link ReadableContentChannel}.</p>

@param content The content to read the stream from.
jdisc_core/src/main/java/com/yahoo/jdisc/handler/UnsafeContentInputStream.java