Java Reference
In-Depth Information
}
return buffer.toString();
} else
{
return (parseString());
}
}
/**
* Called to parse a double or single quote string.
*
* @return The string parsed.
* @throws IOException
* If an I/O exception occurs.
*/
protected String parseString() throws IOException
{
StringBuilder result = new StringBuilder();
eatWhitespace();
if ("\"\'".indexOf(this.source.peek()) != -1)
{
int delim = this.source.read();
while ((this.source.peek() != delim) &&
(this.source.peek() != -1))
{
if (result.length() > 1000)
{
break;
}
int ch = parseSpecialCharacter();
if ((ch == 13) || (ch == 10))
{
continue;
}
result.append((char) ch);
}
if ("\"\'".indexOf(this.source.peek()) != -1)
{
this.source.read();
}
} else
{
while (!Character.isWhitespace(this.source.peek())
&& (this.source.peek() != -1) &&
(this.source.peek() != '>'))
{
Search WWH ::




Custom Search