com.sosnoski.xmlbench
Class BenchSAX.InnerHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--com.sosnoski.xmlbench.BenchSAX.InnerHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Enclosing class:
BenchSAX

protected class BenchSAX.InnerHandler
extends org.xml.sax.helpers.DefaultHandler

Inner class for handling SAX notifications.


Constructor Summary
protected BenchSAX.InnerHandler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Character data handler.
 DocumentSummary getSummary()
          Getter for document summary information.
 void ignorableWhitespace(char[] ch, int start, int length)
          Ignorable whitespace handler.
 void setSummary(DocumentSummary summary)
          Setter for document summary information.
 void startDocument()
          Start of document handler.
 void startElement(java.lang.String space, java.lang.String name, java.lang.String raw, org.xml.sax.Attributes atts)
          Start of element handler.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endElement, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BenchSAX.InnerHandler

protected BenchSAX.InnerHandler()
Method Detail

getSummary

public DocumentSummary getSummary()
Getter for document summary information.
Returns:
document summary information

setSummary

public void setSummary(DocumentSummary summary)
Setter for document summary information.
Parameters:
summary - document summary information

startDocument

public void startDocument()
Start of document handler. Clears the accumulated document summary information.
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(java.lang.String space,
                         java.lang.String name,
                         java.lang.String raw,
                         org.xml.sax.Attributes atts)
Start of element handler. Counts the element and attributes.
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
space - namespace URI
name - local name of element
raw - raw element name
atts - attributes for element

characters

public void characters(char[] ch,
                       int start,
                       int length)
Character data handler. Counts the characters in total for document.
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - array supplying character data
start - starting offset in array
length - number of characters

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Ignorable whitespace handler. Counts the characters in total for document.
Overrides:
ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - array supplying character data
start - starting offset in array
length - number of characters


Company Web Site

XML Benchmark Home