org.xmlpull.mxp1
Class MXParserCachingStrings

java.lang.Object
  |
  +--org.xmlpull.mxp1.MXParser
        |
        +--org.xmlpull.mxp1.MXParserCachingStrings
All Implemented Interfaces:
XmlPullParser
Direct Known Subclasses:
MXParserNonValidating

public class MXParserCachingStrings
extends MXParser

Extend MXP parser to use string cache of char[] to interned String

NOTE: it is not non-validaint parser as there is no supporting internal DTD parsing no full XML 1.0 (or 1.1) character classes are supported.

Author:
Aleksander Slominski

Field Summary
 
Fields inherited from interface org.xmlpull.v1.XmlPullParser
CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES
 
Constructor Summary
MXParserCachingStrings()
           
 
Method Summary
 void finalize()
          Hook to GC finalization to print statistics about pool cache impl.
 boolean getFeature(String name)
          Unknown properties are always returned as false
 void setFeature(String name, boolean state)
          This allows to change name iterning property in this enhanced impl.
 
Methods inherited from class org.xmlpull.mxp1.MXParser
defineEntityReplacementText, getAttributeCount, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getColumnNumber, getDepth, getEventType, getInputEncoding, getLineNumber, getName, getNamespace, getNamespace, getNamespaceCount, getNamespacePrefix, getNamespaceUri, getPositionDescription, getPrefix, getProperty, getText, getTextCharacters, isAttributeDefault, isEmptyElementTag, isWhitespace, next, nextTag, nextText, nextToken, parseEndTag, parseStartTag, require, setInput, setInput, setProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MXParserCachingStrings

public MXParserCachingStrings()
Method Detail

setFeature

public void setFeature(String name,
                       boolean state)
                throws XmlPullParserException
This allows to change name iterning property in this enhanced impl.

Specified by:
setFeature in interface XmlPullParser
Overrides:
setFeature in class MXParser
Parameters:
name - a String
state - a boolean
Throws:
XmlPullParserException

getFeature

public boolean getFeature(String name)
Description copied from class: MXParser
Unknown properties are always returned as false

Specified by:
getFeature in interface XmlPullParser
Overrides:
getFeature in class MXParser
Parameters:
name - The name of feature to be retrieved.
Returns:
The value of the feature.

finalize

public void finalize()
Hook to GC finalization to print statistics about pool cache impl. perf.

Overrides:
finalize in class Object


Copyright (c) 2003 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.