public class InterningXMLReader extends org.xml.sax.helpers.XMLFilterImpl
XMLReader that interns all the string constants before
calling the ContentHandler.
Most of the parsers out there (at least Crimson and Xerces) supports
SAX http://xml.org/sax/features/string-interning feature,
but if the parser doesn't support it (or if the SAX events is read
from components other than XMLReader, this adaptor is used
to make all strings interned.
| Modifier | Constructor and Description |
|---|---|
protected |
InterningXMLReader() |
protected |
InterningXMLReader(XMLReader core) |
| Modifier and Type | Method and Description |
|---|---|
static XMLReader |
adapt(XMLReader reader)
Wraps the given
XMLReader (if necessary) so that
it performs string interning. |
void |
endElement(String uri,
String localName,
String qName) |
void |
endPrefixMapping(String prefix) |
void |
processingInstruction(String target,
String data) |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
characters, endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, unparsedEntityDecl, warningprotected InterningXMLReader(XMLReader core)
protected InterningXMLReader()
public static XMLReader adapt(XMLReader reader)
XMLReader (if necessary) so that
it performs string interning.public void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerprocessingInstruction in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.XMLFilterImplSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.XMLFilterImplSAXExceptionCopyright © 2015 Oracle Corporation. All Rights Reserved.