Package eu.bandm.tools.util
Class TeeContentHandler
java.lang.Object
eu.bandm.tools.util.TeeContentHandler
- All Implemented Interfaces:
ContentHandler
,ErrorHandler
Delivers SAX events and SAX error messages to multiple targets.
Maintains two distinct lists of targets, for the two different implemented
interfaces.
-
Constructor Summary
ConstructorDescriptionConstructur setting no targets.Constructur setting one Content Handler as target.Constructur setting two content handlers as target. -
Method Summary
Modifier and TypeMethodDescriptionAdd one Content Handler as target.Add one error handler as target.void
addHandler
(Object o) Add one object as target.void
characters
(char[] c, int a, int b) void
void
endElement
(String a, String b, String c) void
void
void
Return the list of all currently registered content handlers.Return the list of all currently registered error handlers.void
ignorableWhitespace
(char[] c, int a, int b) void
void
void
void
void
startElement
(String a, String b, String c, Attributes d) void
startPrefixMapping
(String p, String u) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
TeeContentHandler
public TeeContentHandler()Constructur setting no targets. These must be added afterwards explicitly by callingaddHandler(java.lang.Object)
or sim. -
TeeContentHandler
Constructur setting one Content Handler as target. -
TeeContentHandler
Constructur setting two content handlers as target.
-
-
Method Details
-
addContentHandler
Add one Content Handler as target. -
getContentHandlers
Return the list of all currently registered content handlers. -
getErrorHandlers
Return the list of all currently registered error handlers. -
addErrorHandler
Add one error handler as target. -
addHandler
Add one object as target. Use it as error handler and/or as content handler, depending on the implemented interfaces. These are inquired at run-time by reflection. -
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-