code: protected final void parseQuoted(String name, char quoteChar, TextBuffer tbuf)
          throws XMLStreamException
      {
          if (quoteChar != '"' && quoteChar != '\'') {
              throwUnexpectedChar(quoteChar, " in xml declaration; waited ' or \" to start a value for pseudo-attribute '"+name+"'");
          }
          char[] outBuf = tbuf.getCurrentSegment();
          int outPtr = 0;
  
          while (true) {
              char c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
                  : getNextChar(SUFFIX_IN_XML_DECL);
              
              if (c == quoteChar) {
                  break;
              }
              if (c < CHAR_SPACE || c == '<') {
                  throwUnexpectedChar(c, SUFFIX_IN_XML_DECL);
              } else if (c == CHAR_NULL) {
                  throwNullChar();
              }
              if (outPtr >= outBuf.length) {
                  outBuf = tbuf.finishCurrentSegment();
                  outPtr = 0;
              }
              outBuf[outPtr++] = c;
          }
          tbuf.setCurrentLength(outPtr);
      }
docs: Method called to parse quoted xml declaration pseudo-attribute values.
  Works similar to attribute value parsing, except no entities can be
  included, and in general need not be as picky (since caller is to
  verify contents). One exception is that we do check for linefeeds
  and lt chars, since they generally would indicate problems and
  are useful to catch early on (can happen if a quote is missed etc)
  <p>
  Note: since it'll be called at most 3 times per document, this method
  is not optimized too much.