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
ConstructorsConstructorDescriptionConstructur 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.voidaddHandler(Object o) Add one object as target.voidcharacters(char[] c, int a, int b) voidvoidendElement(String a, String b, String c) voidvoidvoidReturn the list of all currently registered content handlers.Return the list of all currently registered error handlers.voidignorableWhitespace(char[] c, int a, int b) voidvoidvoidvoidvoidstartElement(String a, String b, String c, Attributes d) voidstartPrefixMapping(String p, String u) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
warning
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-
error
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-