@Override
    public int read() throws IOException {
        if (pos >= count) {
            fill();
            if (pos >= count)
                return -1;
        }

        return getBufIfOpen()[pos++] & 0xff;
    }
See the general contract of the <code>read</code>
method of <code>InputStream</code>.

@return the next byte of data, or <code>-1</code> if the end of the
stream is reached.
@throws IOException if this input stream has been closed by
                    invoking its {@link #close()} method,
                    or an I/O error occurs.
@see BufferedInputStream#read()
clients/src/main/java/org/apache/kafka/common/utils/ChunkedBytesStream.java