Package org.jfree.xml.parser
Class AbstractXmlReadHandler
java.lang.Object
org.jfree.xml.parser.AbstractXmlReadHandler
- All Implemented Interfaces:
XmlReadHandler
- Direct Known Subclasses:
Base64ReadHandler,BasicStrokeReadHandler,ColorReadHandler,FontReadHandler,GenericReadHandler,GradientPaintReadHandler,InsetsReadHandler,ListReadHandler,NullReadHandler,ObjectRefHandler,Point2DReadHandler,Rectangle2DReadHandler,RenderingHintsReadHandler,RenderingHintValueReadHandler,StringReadHandler
A base class for implementing an
XmlReadHandler.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) This method is called to process the character data between element tags.protected voidDone parsing.final voidendElement(String tagName) This method is called at the end of an element.protected XmlReadHandlergetHandlerForChild(String tagName, Attributes atts) Returns the handler for a child element.Returns the root handler for the parsing.Returns the tag name.voidinit(RootXmlReadHandler rootHandler, String tagName) Initialises the handler.final voidstartElement(String tagName, Attributes attrs) This method is called at the start of an element.protected voidstartParsing(Attributes attrs) Starts parsing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.xml.parser.XmlReadHandler
getObject
-
Constructor Details
-
AbstractXmlReadHandler
public AbstractXmlReadHandler()Creates a new handler.
-
-
Method Details
-
init
Initialises the handler.- Specified by:
initin interfaceXmlReadHandler- Parameters:
rootHandler- the root handler.tagName- the tag name.
-
startElement
public final void startElement(String tagName, Attributes attrs) throws XmlReaderException, SAXException This method is called at the start of an element.- Specified by:
startElementin interfaceXmlReadHandler- Parameters:
tagName- the tag name.attrs- the attributes.- Throws:
SAXException- if there is a parsing error.XmlReaderException- if there is a reader error.
-
characters
This method is called to process the character data between element tags.- Specified by:
charactersin interfaceXmlReadHandler- Parameters:
ch- the character buffer.start- the start index.length- the length.- Throws:
SAXException- if there is a parsing error.
-
endElement
This method is called at the end of an element.- Specified by:
endElementin interfaceXmlReadHandler- Parameters:
tagName- the tag name.- Throws:
SAXException- if there is a parsing error.
-
startParsing
Starts parsing.- Parameters:
attrs- the attributes.- Throws:
SAXException- if there is a parsing error.XmlReaderException- ?
-
doneParsing
Done parsing.- Throws:
SAXException- if there is a parsing error.XmlReaderException- if there is a reader error.
-
getHandlerForChild
protected XmlReadHandler getHandlerForChild(String tagName, Attributes atts) throws XmlReaderException, SAXException Returns the handler for a child element.- Parameters:
tagName- the tag name.atts- the attributes.- Returns:
- the handler or null, if the tagname is invalid.
- Throws:
SAXException- if there is a parsing error.XmlReaderException- if there is a reader error.
-
getTagName
Returns the tag name.- Returns:
- the tag name.
-
getRootHandler
Returns the root handler for the parsing.- Returns:
- the root handler.
-