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_attrCollectorprotected ContentHandler_contentHandlerprotected DTDHandler_dtdHandlerprotected com.fasterxml.aalto.in.XmlScanner_scannerSince 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:
getXMLReaderin classSAXParser
-
isNamespaceAware
public boolean isNamespaceAware()
- Specified by:
isNamespaceAwarein classSAXParser
-
isValidating
public boolean isValidating()
- Specified by:
isValidatingin classSAXParser
-
getProperty
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getPropertyin interfaceXMLReader- Specified by:
getPropertyin classSAXParser- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
setProperty
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setPropertyin interfaceXMLReader- Specified by:
setPropertyin classSAXParser- Throws:
SAXNotRecognizedExceptionSAXNotSupportedException
-
parse
public void parse(InputSource is, HandlerBase hb) throws SAXException, IOException
- Overrides:
parsein classSAXParser- Throws:
SAXExceptionIOException
-
parse
public void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException
- Overrides:
parsein classSAXParser- Throws:
SAXExceptionIOException
-
getContentHandler
public ContentHandler getContentHandler()
- Specified by:
getContentHandlerin interfaceXMLReader
-
getDTDHandler
public DTDHandler getDTDHandler()
- Specified by:
getDTDHandlerin interfaceXMLReader
-
getEntityResolver
public EntityResolver getEntityResolver()
- Specified by:
getEntityResolverin interfaceXMLReader
-
getErrorHandler
public ErrorHandler getErrorHandler()
- Specified by:
getErrorHandlerin interfaceXMLReader
-
getFeature
public boolean getFeature(String name) throws SAXNotRecognizedException
- Specified by:
getFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedException
-
setContentHandler
public void setContentHandler(ContentHandler handler)
- Specified by:
setContentHandlerin interfaceXMLReader
-
setDTDHandler
public void setDTDHandler(DTDHandler handler)
- Specified by:
setDTDHandlerin interfaceParser- Specified by:
setDTDHandlerin interfaceXMLReader
-
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
- Specified by:
setEntityResolverin interfaceParser- Specified by:
setEntityResolverin interfaceXMLReader
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Specified by:
setErrorHandlerin interfaceParser- Specified by:
setErrorHandlerin interfaceXMLReader
-
setFeature
public void setFeature(String name, boolean value) throws SAXNotRecognizedException
- Specified by:
setFeaturein interfaceXMLReader- Throws:
SAXNotRecognizedException
-
parse
public void parse(InputSource input) throws SAXException
- Specified by:
parsein interfaceParser- Specified by:
parsein interfaceXMLReader- Throws:
SAXException
-
parse
public void parse(String systemId) throws SAXException
- Specified by:
parsein interfaceParser- Specified by:
parsein interfaceXMLReader- Throws:
SAXException
-
setDocumentHandler
public void setDocumentHandler(DocumentHandler handler)
- Specified by:
setDocumentHandlerin interfaceParser
-
getIndex
public int getIndex(String qName)
- Specified by:
getIndexin interfaceAttributes
-
getIndex
public int getIndex(String uri, String localName)
- Specified by:
getIndexin interfaceAttributes
-
getLength
public int getLength()
- Specified by:
getLengthin interfaceAttributes
-
getLocalName
public String getLocalName(int index)
- Specified by:
getLocalNamein interfaceAttributes
-
getQName
public String getQName(int index)
- Specified by:
getQNamein interfaceAttributes
-
getType
public String getType(int index)
- Specified by:
getTypein interfaceAttributes
-
getType
public String getType(String qName)
- Specified by:
getTypein interfaceAttributes
-
getType
public String getType(String uri, String localName)
- Specified by:
getTypein interfaceAttributes
-
getURI
public String getURI(int index)
- Specified by:
getURIin interfaceAttributes
-
getValue
public String getValue(int index)
- Specified by:
getValuein interfaceAttributes
-
getValue
public String getValue(String qName)
- Specified by:
getValuein interfaceAttributes
-
getValue
public String getValue(String uri, String localName)
- Specified by:
getValuein interfaceAttributes
-
isDeclared
public boolean isDeclared(int index)
- Specified by:
isDeclaredin interfaceAttributes2
-
isDeclared
public boolean isDeclared(String qName)
- Specified by:
isDeclaredin interfaceAttributes2
-
isDeclared
public boolean isDeclared(String uri, String localName)
- Specified by:
isDeclaredin interfaceAttributes2
-
isSpecified
public boolean isSpecified(int index)
- Specified by:
isSpecifiedin interfaceAttributes2
-
isSpecified
public boolean isSpecified(String qName)
- Specified by:
isSpecifiedin interfaceAttributes2
-
isSpecified
public boolean isSpecified(String uri, String localName)
- Specified by:
isSpecifiedin interfaceAttributes2
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceLocator
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceLocator
-
getPublicId
public String getPublicId()
- Specified by:
getPublicIdin interfaceLocator
-
getSystemId
public String getSystemId()
- Specified by:
getSystemIdin interfaceLocator
-
getEncoding
public String getEncoding()
- Specified by:
getEncodingin interfaceLocator2
-
getXMLVersion
public String getXMLVersion()
- Specified by:
getXMLVersionin interfaceLocator2
-
-