@Override
    public String readString() throws IOException
    {
        if (offset + 2 > limit && !readable(2))
            throw new ProtostuffException("Truncated message.");

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

        if (size == 0)
            return ByteString.EMPTY_STRING;

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

        if (offset + size > limit)
        {
            if (size > buffer.length)
            {
                // need to create a copy.
                return STRING.deser(fill(new byte[size], 0, size));
            }

            // it can fit in the buffer.
            if (!readable(size))
                throw new ProtostuffException("Truncated Message.");

            // final String str = STRING.deser(buffer, offset, size);
            // offset += size;
            // return str;
        }

        final String str = STRING.deser(buffer, offset, size);
        offset += size;
        return str;
    }
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