@Override
    public int read(byte[] b, int off, int len) throws IOException {
        if (len == 0) {
            return 0;
        }
        ByteBuffer buffer = getBuffer();
        int remaining = buffer.remaining();
        if (len > remaining) {
            buffer.get(b, off, remaining);
            return remaining;
        } else {
            buffer.get(b, off, len);
            return len;
        }
    }
Read content of specified length

@param b     the content buffer
@param off   the offset position
@param len   the content length
@throws java.io.EOFException if EOF is reached before reading all the bytes.
@see java.io.InputStream#read(byte[], int, int)
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/netty/ByteBufferInputStream.java