Java Reference
In-Depth Information
return this.source.read();
}
}
// look for next tag
if (this.source.peek() == '<')
{
parseTag();
if (!this.tag.isEnding()
&& (this.tag.getName().equalsIgnoreCase("script")
|| this.tag.getName().equalsIgnoreCase("style")))
{
this.lockedEndTag = this.tag.getName().toLowerCase();
}
return 0;
} else if (this.source.peek() == '&')
{
return parseSpecialCharacter();
} else
{
return (this.source.read());
}
}
/**
* Convert the HTML document back to a string.
*/
@Override
public String toString()
{
try
{
StringBuilder result = new StringBuilder();
int ch = 0;
StringBuilder text = new StringBuilder();
do
{
ch = read();
if (ch == 0)
{
if (text.length() > 0)
{
System.out.println("Text:" + text.toString());
text.setLength(0);
}
Search WWH ::




Custom Search