Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.xml.pipeline.TeeConsumer
public final class TeeConsumer
extends java.lang.Object
implements EventConsumer, ContentHandler, DTDHandler, LexicalHandler, DeclHandler
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
ContentHandler |
|
DTDHandler |
|
EventConsumer |
|
Object |
|
EventConsumer |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
public TeeConsumer(EventConsumer car, EventConsumer cdr)
Constructs a consumer which sends all its events to the first consumer, and then the second one. If the first consumer throws an exception, the second one will not see the event which caused that exception to be reported.
- Parameters:
car
- The first consumer to get the eventscdr
- The second consumer to get the events
public void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException
- Specified by:
- attributeDecl in interface DeclHandler
public void characters(ch[] , int start, int length) throws SAXException
- Specified by:
- characters in interface ContentHandler
public void comment(ch[] , int start, int length) throws SAXException
- Specified by:
- comment in interface LexicalHandler
public void elementDecl(String name, String model) throws SAXException
- Specified by:
- elementDecl in interface DeclHandler
public void endDocument() throws SAXException
- Specified by:
- endDocument in interface ContentHandler
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
- endElement in interface ContentHandler
public void endEntity(String name) throws SAXException
- Specified by:
- endEntity in interface LexicalHandler
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
- endPrefixMapping in interface ContentHandler
public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
- externalEntityDecl in interface DeclHandler
public final ContentHandler getContentHandler()
Returns the content handler being used.
- Specified by:
- getContentHandler in interface EventConsumer
public final DTDHandler getDTDHandler()
Returns the dtd handler being used.
- Specified by:
- getDTDHandler in interface EventConsumer
public final Object getProperty(String id) throws SAXNotRecognizedException
Returns the declaration or lexical handler being used.
- Specified by:
- getProperty in interface EventConsumer
public void ignorableWhitespace(ch[] , int start, int length) throws SAXException
- Specified by:
- ignorableWhitespace in interface ContentHandler
public void internalEntityDecl(String name, String value) throws SAXException
- Specified by:
- internalEntityDecl in interface DeclHandler
public void notationDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
- notationDecl in interface DTDHandler
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
- processingInstruction in interface ContentHandler
public void setDocumentLocator(Locator locator)
- Specified by:
- setDocumentLocator in interface ContentHandler
public void setErrorHandler(ErrorHandler handler)
Provides the error handler to both subsequent nodes of this filter stage.
- Specified by:
- setErrorHandler in interface EventConsumer
public void skippedEntity(String name) throws SAXException
- Specified by:
- skippedEntity in interface ContentHandler
public void startCDATA() throws SAXException
- Specified by:
- startCDATA in interface LexicalHandler
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
- startDTD in interface LexicalHandler
public void startDocument() throws SAXException
- Specified by:
- startDocument in interface ContentHandler
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
- startElement in interface ContentHandler
public void startEntity(String name) throws SAXException
- Specified by:
- startEntity in interface LexicalHandler
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
- startPrefixMapping in interface ContentHandler
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
- Specified by:
- unparsedEntityDecl in interface DTDHandler