|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnu.validator.htmlparser.test.TokenPrinter
public class TokenPrinter
| Field Summary | |
|---|---|
private Writer |
writer
|
| Constructor Summary | |
|---|---|
TokenPrinter(Writer writer)
|
|
| Method Summary | |
|---|---|
void |
characters(char[] buf,
int start,
int length)
Receive character tokens. |
void |
comment(char[] buf,
int length)
Receive a comment token. |
void |
doctype(String name,
String publicIdentifier,
String systemIdentifier,
boolean correct)
Receive a doctype token. |
void |
endTag(String name,
Attributes attributes)
Receive an end tag token. |
void |
eof()
The end-of-file token. |
void |
error(SAXParseException exception)
|
void |
fatalError(SAXParseException exception)
|
static void |
main(String[] args)
|
void |
start(Tokenizer self)
This method is called at the start of tokenization before any other methods on this interface are called. |
void |
startTag(String name,
Attributes attributes)
Receive a start tag token. |
boolean |
wantsComments()
If this handler implementation cares about comments, return true. |
void |
warning(SAXParseException exception)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Writer writer
| Constructor Detail |
|---|
public TokenPrinter(Writer writer)
writer - | Method Detail |
|---|
public void characters(char[] buf,
int start,
int length)
throws SAXException
TokenHandler
characters in interface TokenHandlerbuf - a buffer holding the datastart - offset into the bufferlength - the number of code units to read
SAXException - if something went wrongContentHandler.characters(char[], int, int)
public void comment(char[] buf,
int length)
throws SAXException
TokenHandlerwantsComments()
returned false.
comment in interface TokenHandlerbuf - a buffer holding the datalength - the number of code units to read
SAXException - if something went wrong
public void doctype(String name,
String publicIdentifier,
String systemIdentifier,
boolean correct)
throws SAXException
TokenHandler
doctype in interface TokenHandlername - the namepublicIdentifier - the public idsystemIdentifier - the system idcorrect - whether the token is correct
SAXException - if something went wrong
public void endTag(String name,
Attributes attributes)
throws SAXException
TokenHandler
endTag in interface TokenHandlername - the tag nameattributes - the attributes
SAXException - if something went wrong
public void eof()
throws SAXException
TokenHandler
eof in interface TokenHandlerSAXException - if something went wrong
public void start(Tokenizer self)
throws SAXException
TokenHandlerTokenizer in order to set the
content model flag and in order to be able to query for
Locator data.
start in interface TokenHandlerself - the Tokenizer.
SAXException - if something went wrong
public void startTag(String name,
Attributes attributes)
throws SAXException
TokenHandler
startTag in interface TokenHandlername - the tag nameattributes - the attributes
SAXException - if something went wrong
public boolean wantsComments()
throws SAXException
TokenHandlertrue.
If not, return false.
wantsComments in interface TokenHandlerSAXException - if something went wrong
public static void main(String[] args)
throws SAXException,
IOException
SAXException
IOException
public void error(SAXParseException exception)
throws SAXException
error in interface ErrorHandlerSAXException
public void fatalError(SAXParseException exception)
throws SAXException
fatalError in interface ErrorHandlerSAXException
public void warning(SAXParseException exception)
throws SAXException
warning in interface ErrorHandlerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||