Java Reference
In-Depth Information
private boolean peekEndTag(String name) throws IOException
{
int i = 0;
// pass any whitespace
while ((this.source.peek(i) != -1)
&& Character.isWhitespace(this.source.peek(i)))
{
i++;
}
// is a tag beginning
if (this.source.peek(i) != '<')
{
return false;
} else
{
i++;
}
// pass any whitespace
while ((this.source.peek(i) != -1)
&& Character.isWhitespace(this.source.peek(i)))
{
i++;
}
// is it an end tag
if (this.source.peek(i) != '/')
{
return false;
} else
{
i++;
}
// pass any whitespace
while ((this.source.peek(i) != -1)
&& Character.isWhitespace(this.source.peek(i)))
{
i++;
}
// does the name match
for (int j = 0; j < name.length(); j++)
{
Search WWH ::




Custom Search