org.pentaho.reporting.libraries.xmlns.parser
Class StringReadHandler

java.lang.Object
  extended by org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
      extended by org.pentaho.reporting.libraries.xmlns.parser.StringReadHandler
All Implemented Interfaces:
XmlReadHandler
Direct Known Subclasses:
PropertyReadHandler

public class StringReadHandler
extends AbstractXmlReadHandler

A XmlReadHandler that reads character-data for the given element.

Author:
Thomas Morgner

Constructor Summary
StringReadHandler()
          Creates a new handler.
 
Method Summary
 void characters(char[] ch, int start, int length)
          This method is called to process the character data between element tags.
protected  void doneParsing()
          Done parsing.
 java.lang.Object getObject()
          Returns the object for this element.
 java.lang.String getResult()
          Returns the result as string.
protected  void startParsing(org.xml.sax.Attributes attrs)
          Starts parsing.
 
Methods inherited from class org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlReadHandler
deriveParseParameters, endElement, getHandlerForChild, getLocator, getRootHandler, getTagName, getUri, init, isSameNamespace, performExternalParsing, performExternalParsing, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringReadHandler

public StringReadHandler()
Creates a new handler.

Method Detail

startParsing

protected void startParsing(org.xml.sax.Attributes attrs)
                     throws org.xml.sax.SAXException
Starts parsing.

Overrides:
startParsing in class AbstractXmlReadHandler
Parameters:
attrs - the attributes.
Throws:
org.xml.sax.SAXException - if there is a parsing error.

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
This method is called to process the character data between element tags.

Specified by:
characters in interface XmlReadHandler
Overrides:
characters in class AbstractXmlReadHandler
Parameters:
ch - the character buffer.
start - the start index.
length - the length.
Throws:
org.xml.sax.SAXException - if there is a parsing error.

doneParsing

protected void doneParsing()
                    throws org.xml.sax.SAXException
Done parsing.

Overrides:
doneParsing in class AbstractXmlReadHandler
Throws:
org.xml.sax.SAXException - if there is a parsing error.

getResult

public java.lang.String getResult()
Returns the result as string.

Returns:
the parse-result as string.

getObject

public java.lang.Object getObject()
Returns the object for this element.

Returns:
the object.