@Override
    public void readBytes(final ByteBuffer bb) throws IOException
    {
        if (offset + 2 > limit && !readable(2))
            throw new ProtostuffException("Truncated message.");

        final int size = buffer[offset++] | (buffer[offset++] << 8);

        if (size == 0)
        {
            bb.put(ByteString.EMPTY_BYTE_ARRAY);
            return;
        }

        if (size > MAX_VALUE_SIZE)
            throw new ProtostuffException("Exceeded kvp max value size.");

        if (offset + size > limit)
        {
            fill(bb.array(), 0, size);
        }

        bb.put(buffer, offset, size);
        offset += size;
    }
Returns true if there are {@code minimum} bytes available for reading.
<p>
The caller is responsible that the arg {@code minimum} is not larger than the buffer size.
protostuff-kvp/src/main/java/io/protostuff/KvpInput.java