private void readString() {
            iRSString = EMPTY_STRING;
            iRSterminator = -1;

            int qbuflen = m_queryBuf.length() - m_nextPos;
            if (qbuflen == 0) {
                return;
            }

            /* worst case is that all remaining chars in iQueryBuf
             * belongs to the string and are ASCII chars without any
             * percent encodes. But if there are any percent encodes
             * or there are more than one string to read in the
             * buffer, there will be fewer bytes in bbuf than chars
             * remaining in iQueryBuf.
            */
            byte[] bbuf = new byte[qbuflen];
            int bbufnextpos = 0;

            // at least one char to read
            int c;
            do {
                c = m_queryBuf.charAt(m_nextPos++);
                if (c == '&' || c == '=') {
                    break;
                }
                if (c == '%') {
                    c = parsePctCodedByte(m_queryBuf, m_nextPos);
                    m_nextPos += 2;
                } 
                else if (c == '+') {
                    c = 0x20;
                }
                // we don't get here if we shouldn't add the char
                bbuf[bbufnextpos++] = (byte) c;
            } while (m_nextPos < m_queryBuf.length());

            // at least one. convert string if added bytes check c,
            // then check eos

            if (bbufnextpos > 0) {
                iRSString = WFUtil.UTF8BytesToString(bbuf, 0, bbufnextpos);
            }

            if (m_nextPos < m_queryBuf.length()) {
                iRSterminator = c;
            }
        }