Package com.thoughtworks.xstream.io.xml
Class XppDriver
- java.lang.Object
-
- com.thoughtworks.xstream.io.AbstractDriver
-
- com.thoughtworks.xstream.io.xml.AbstractXmlDriver
-
- com.thoughtworks.xstream.io.xml.AbstractXppDriver
-
- com.thoughtworks.xstream.io.xml.XppDriver
-
- All Implemented Interfaces:
HierarchicalStreamDriver
public class XppDriver extends AbstractXppDriver
AHierarchicalStreamDriver
using the XmlPullParserFactory to locate an XML Pull Parser.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.xmlpull.v1.XmlPullParserFactory
factory
-
Constructor Summary
Constructors Constructor Description XppDriver()
XppDriver(NameCoder nameCoder)
XppDriver(XmlFriendlyReplacer replacer)
Deprecated.As of 1.4, useXppDriver(NameCoder)
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.xmlpull.v1.XmlPullParser
createDefaultParser()
Create a default XML Pull Parser.protected org.xmlpull.v1.XmlPullParser
createParser()
Create the parser of the XPP implementation.-
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXppDriver
createReader, createReader, createWriter, createWriter
-
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlDriver
xmlFriendlyReplacer
-
Methods inherited from class com.thoughtworks.xstream.io.AbstractDriver
createReader, createReader, getNameCoder
-
-
-
-
Constructor Detail
-
XppDriver
public XppDriver()
-
XppDriver
public XppDriver(NameCoder nameCoder)
- Since:
- 1.4
-
XppDriver
public XppDriver(XmlFriendlyReplacer replacer)
Deprecated.As of 1.4, useXppDriver(NameCoder)
instead.- Since:
- 1.2
-
-
Method Detail
-
createDefaultParser
public static org.xmlpull.v1.XmlPullParser createDefaultParser() throws org.xmlpull.v1.XmlPullParserException
Create a default XML Pull Parser. The method uses the Java Service API to get the registeredXmlPullParserFactory
and let it create a new parser.- Returns:
- a new instance of an XML Pull Parser
- Throws:
org.xmlpull.v1.XmlPullParserException
- if the creation of a new parser fails.- Since:
- 1.4.11
-
createParser
protected org.xmlpull.v1.XmlPullParser createParser() throws org.xmlpull.v1.XmlPullParserException
Description copied from class:AbstractXppDriver
Create the parser of the XPP implementation.- Specified by:
createParser
in classAbstractXppDriver
- Throws:
org.xmlpull.v1.XmlPullParserException
- if the parser cannot be created
-
-