|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.demo.embed.tools.EasyContentHandlerProxy
public class EasyContentHandlerProxy
This class is an implementation of ContentHandler which acts as a proxy to
another ContentHandler and has the purpose to provide a few handy methods
that make life easier when generating SAX events.
Note: This class is only useful for simple cases with no namespaces.
Field Summary | |
---|---|
static Attributes |
EMPTY_ATTS
An empty Attributes object used when no attributes are needed. |
Constructor Summary | |
---|---|
EasyContentHandlerProxy(ContentHandler forwardTo)
Main constructor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
characters(String s)
Send a String of character data. |
void |
element(String name,
String value)
Sends notifications for a whole element with some String content. |
void |
element(String name,
String value,
Attributes atts)
Sends notifications for a whole element with some String content. |
void |
endDocument()
|
void |
endElement(String name)
Send the notification of the end of an element. |
void |
endElement(String namespaceURI,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String name)
Sends the notification of the beginning of an element. |
void |
startElement(String name,
Attributes atts)
Sends the notification of the beginning of an element. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Attributes EMPTY_ATTS
Constructor Detail |
---|
public EasyContentHandlerProxy(ContentHandler forwardTo)
forwardTo
- ContentHandler to forward the SAX event to.Method Detail |
---|
public void startElement(String name) throws SAXException
name
- Name for the element.
SAXException
- Any SAX exception, possibly wrapping another
exception.public void startElement(String name, Attributes atts) throws SAXException
name
- Name for the element.atts
- The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
- Any SAX exception, possibly wrapping another
exception.public void characters(String s) throws SAXException
s
- The content String
SAXException
- Any SAX exception, possibly wrapping another
exception.public void endElement(String name) throws SAXException
name
- Name for the element.
SAXException
- Any SAX exception, possibly wrapping another
exception.public void element(String name, String value) throws SAXException
name
- Name for the element.value
- Content of the element.
SAXException
- Any SAX exception, possibly wrapping another
exception.public void element(String name, String value, Attributes atts) throws SAXException
name
- Name for the element.value
- Content of the element.atts
- The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
SAXException
- Any SAX exception, possibly wrapping another
exception.public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |