Java Reference
In-Depth Information
result.append(parseSpecialCharacter());
}
}
return result.toString();
}
/**
* Called when a tag is detected. This method will parse
* the tag.
*
* @throws IOException
* If an I/O exception occurs.
*/
protected void parseTag() throws IOException
{
this.tag.clear();
StringBuilder tagName = new StringBuilder();
this.source.read();
// Is it a comment?
if ((this.source.peek(0) == '!') &&
(this.source.peek(1) == '-')
&& (this.source.peek(2) == '-'))
{
while (this.source.peek() != -1)
{
if ((this.source.peek(0) == '-') &&
(this.source.peek(1) == '-')
&& (this.source.peek(2) == '>'))
{
break;
}
if (this.source.peek() != '\r')
{
tagName.append((char) this.source.peek());
}
this.source.read();
}
tagName.append("--");
this.source.read();
this.source.read();
this.source.read();
return;
}
Search WWH ::




Custom Search