private String parseQuotedString() throws ParseException {
  skip();
  List<Byte> strBytes=new LinkedList<Byte>();
  boolean unescapedBackslash=true;
  while (data[index] != QUOTEDSTRING_END_TOKEN || (data[index - 1] == QUOTEDSTRING_ESCAPE_TOKEN && unescapedBackslash)) {
    strBytes.add(data[index]);
    if (accept(QUOTEDSTRING_ESCAPE_TOKEN)) {
      unescapedBackslash=!(data[index - 1] == QUOTEDSTRING_ESCAPE_TOKEN && unescapedBackslash);
    }
    skip();
  }
  byte[] bytArr=new byte[strBytes.size()];
  int i=0;
  for (  Byte b : strBytes) {
    bytArr[i]=b;
    i++;
  }
  String unescapedString;
  try {
    unescapedString=parseQuotedString(new String(bytArr,"UTF-8"));
  }
 catch (  Exception ex) {
    throw new ParseException("The quoted string could not be parsed.",index);
  }
  skip();
  return unescapedString;
}

private String parseQuotedString ( ) throws ParseException { skip ( ) ; List < Byte > strBytes = new LinkedList < Byte > ( ) ; boolean unescapedBackslash = true ; while ( data [ index ] != QUOTEDSTRING_END_TOKEN || ( data [ index - 1 ] == QUOTEDSTRING_ESCAPE_TOKEN && unescapedBackslash ) ) { strBytes . add ( data [ index ] ) ; if ( accept ( QUOTEDSTRING_ESCAPE_TOKEN ) ) { unescapedBackslash = ! ( data [ index - 1 ] == QUOTEDSTRING_ESCAPE_TOKEN && unescapedBackslash ) ; } skip ( ) ; } byte [ ] bytArr = new byte [ strBytes . size ( ) ] ; int i = 0 ; for ( Byte b : strBytes ) { bytArr [ i ] = b ; i ++ ; } String unescapedString ; try { unescapedString = parseQuotedString ( new String ( bytArr , "UTF-8" ) ) ; } catch ( Exception ex ) { throw new ParseException ( "The quoted string could not be parsed." , index ) ; } skip ( ) ; return unescapedString ; }
parses a quoted string from the current parsing position . the prerequisite for calling this method is , that a quoted string begin token has been read .
