Package com.fasterxml.aalto.sax
Class BenchmarkAaltoXMLReader
- java.lang.Object
-
- javax.xml.parsers.SAXParser
-
- com.fasterxml.aalto.sax.BenchmarkAaltoXMLReader
-
- All Implemented Interfaces:
Attributes
,Attributes2
,Locator2
,Locator
,Parser
,XMLReader
public class BenchmarkAaltoXMLReader extends SAXParser implements Parser, XMLReader, Attributes2, Locator2
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.aalto.in.AttributeCollector
_attrCollector
protected ContentHandler
_contentHandler
protected DTDHandler
_dtdHandler
protected com.fasterxml.aalto.in.XmlScanner
_scanner
Since the stream reader would mostly be just a wrapper around the underlying scanner (its main job is to implement Stax interface), we can and should just use the scanner.
-
Constructor Summary
Constructors Constructor Description BenchmarkAaltoXMLReader()
-
Method Summary
-
-
-
Field Detail
-
_scanner
protected com.fasterxml.aalto.in.XmlScanner _scanner
Since the stream reader would mostly be just a wrapper around the underlying scanner (its main job is to implement Stax interface), we can and should just use the scanner. In effect, this class is then a replacement of StreamReaderImpl, when using SAX interfaces.
-
_attrCollector
protected com.fasterxml.aalto.in.AttributeCollector _attrCollector
-
_contentHandler
protected ContentHandler _contentHandler
-
_dtdHandler
protected DTDHandler _dtdHandler
-
-
Method Detail
-
getXMLReader
public final XMLReader getXMLReader()
- Specified by:
getXMLReader
in classSAXParser
-
isNamespaceAware
public boolean isNamespaceAware()
- Specified by:
isNamespaceAware
in classSAXParser
-
isValidating
public boolean isValidating()
- Specified by:
isValidating
in classSAXParser
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getProperty
in interfaceXMLReader
- Specified by:
getProperty
in classSAXParser
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setProperty
in interfaceXMLReader
- Specified by:
setProperty
in classSAXParser
- Throws:
SAXNotRecognizedException
SAXNotSupportedException
-
parse
public void parse(InputSource is, HandlerBase hb) throws SAXException, IOException
- Overrides:
parse
in classSAXParser
- Throws:
SAXException
IOException
-
parse
public void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException
- Overrides:
parse
in classSAXParser
- Throws:
SAXException
IOException
-
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandler
in interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandler
in interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolver
in interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandler
in interfaceXMLReader
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException
- Specified by:
getFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
-
setContentHandler
public void setContentHandler(ContentHandler handler)
- Specified by:
setContentHandler
in interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandler
in interfaceParser
- Specified by:
setDTDHandler
in interfaceXMLReader
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolver
in interfaceParser
- Specified by:
setEntityResolver
in interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandler
in interfaceParser
- Specified by:
setErrorHandler
in interfaceXMLReader
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException
- Specified by:
setFeature
in interfaceXMLReader
- Throws:
SAXNotRecognizedException
-
parse
public void parse(InputSource input) throws SAXException
- Specified by:
parse
in interfaceParser
- Specified by:
parse
in interfaceXMLReader
- Throws:
SAXException
-
parse
public void parse(String systemId) throws SAXException
- Specified by:
parse
in interfaceParser
- Specified by:
parse
in interfaceXMLReader
- Throws:
SAXException
-
setDocumentHandler
public void setDocumentHandler(DocumentHandler handler)
- Specified by:
setDocumentHandler
in interfaceParser
-
getIndex
public int getIndex(String qName)
- Specified by:
getIndex
in interfaceAttributes
-
getIndex
public int getIndex(String uri, String localName)
- Specified by:
getIndex
in interfaceAttributes
-
getLength
public int getLength()
- Specified by:
getLength
in interfaceAttributes
-
getLocalName
public String getLocalName(int index)
- Specified by:
getLocalName
in interfaceAttributes
-
getQName
public String getQName(int index)
- Specified by:
getQName
in interfaceAttributes
-
getType
public String getType(int index)
- Specified by:
getType
in interfaceAttributes
-
getType
public String getType(String qName)
- Specified by:
getType
in interfaceAttributes
-
getType
public String getType(String uri, String localName)
- Specified by:
getType
in interfaceAttributes
-
getURI
public String getURI(int index)
- Specified by:
getURI
in interfaceAttributes
-
getValue
public String getValue(int index)
- Specified by:
getValue
in interfaceAttributes
-
getValue
public String getValue(String qName)
- Specified by:
getValue
in interfaceAttributes
-
getValue
public String getValue(String uri, String localName)
- Specified by:
getValue
in interfaceAttributes
-
isDeclared
public boolean isDeclared(int index)
- Specified by:
isDeclared
in interfaceAttributes2
-
isDeclared
public boolean isDeclared(String qName)
- Specified by:
isDeclared
in interfaceAttributes2
-
isDeclared
public boolean isDeclared(String uri, String localName)
- Specified by:
isDeclared
in interfaceAttributes2
-
isSpecified
public boolean isSpecified(int index)
- Specified by:
isSpecified
in interfaceAttributes2
-
isSpecified
public boolean isSpecified(String qName)
- Specified by:
isSpecified
in interfaceAttributes2
-
isSpecified
public boolean isSpecified(String uri, String localName)
- Specified by:
isSpecified
in interfaceAttributes2
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfaceLocator
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfaceLocator
-
getPublicId
public String getPublicId()
- Specified by:
getPublicId
in interfaceLocator
-
getSystemId
public String getSystemId()
- Specified by:
getSystemId
in interfaceLocator
-
getEncoding
public String getEncoding()
- Specified by:
getEncoding
in interfaceLocator2
-
getXMLVersion
public String getXMLVersion()
- Specified by:
getXMLVersion
in interfaceLocator2
-
-