|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
public class ContentHandlerDecorator
Decorator base class for the ContentHandler interface. This class
simply delegates all SAX events calls to an underlying decorated handler
instance. Subclasses can provide extra decoration by overriding one or more
of the SAX event methods.
| Constructor Summary | |
|---|---|
protected |
ContentHandlerDecorator()
Creates a decorator that by default forwards incoming SAX events to a dummy content handler that simply ignores all the events. |
|
ContentHandlerDecorator(ContentHandler handler)
Creates a decorator for the given SAX event handler. |
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String name)
|
void |
endPrefixMapping(String prefix)
|
protected void |
handleException(SAXException exception)
Handle any exceptions thrown by methods in this class. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
protected void |
setContentHandler(ContentHandler handler)
Sets the underlying content handler. |
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String name,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
String |
toString()
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContentHandlerDecorator(ContentHandler handler)
handler - SAX event handler to be decoratedprotected ContentHandlerDecorator()
setContentHandler(ContentHandler) method to
switch to a more usable underlying content handler.
| Method Detail |
|---|
protected void setContentHandler(ContentHandler handler)
handler - content handler
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.DefaultHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class org.xml.sax.helpers.DefaultHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerprocessingInstruction in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandler
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerSAXException
public void startElement(String uri,
String localName,
String name,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerSAXException
public void endElement(String uri,
String localName,
String name)
throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerSAXException
public void skippedEntity(String name)
throws SAXException
skippedEntity in interface ContentHandlerskippedEntity in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic String toString()
toString in class Object
protected void handleException(SAXException exception)
throws SAXException
exception - the exception that was thrown
SAXException - the exception (if any) thrown to the client
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||