@Override
    public void close() throws IOException {
        byte[] mybuf = intermediateBuf;
        intermediateBuf = null;

        InputStream input = in;
        in = null;

        if (mybuf != null)
            bufferSupplier.release(intermediateBufRef);
        if (input != null)
            input.close();
    }
Fills the intermediate buffer with more data. The amount of new data read is equal to the remaining empty space
in the buffer. For optimal performance, read as much data as possible in this call.
This method also assumes that all data has already been read in, hence pos > count.
clients/src/main/java/org/apache/kafka/common/utils/ChunkedBytesStream.java