com.thoughtworks.xstream.io.xml
Class AbstractXppDriver

java.lang.Object
  extended by com.thoughtworks.xstream.io.AbstractDriver
      extended by com.thoughtworks.xstream.io.xml.AbstractXmlDriver
          extended by com.thoughtworks.xstream.io.xml.AbstractXppDriver
All Implemented Interfaces:
HierarchicalStreamDriver
Direct Known Subclasses:
KXml2Driver, Xpp3Driver, XppDriver

public abstract class AbstractXppDriver
extends AbstractXmlDriver

An abstract base class for a driver using an XPP implementation.

Since:
1.4
Author:
Joe Walnes, Jörg Schaible

Constructor Summary
AbstractXppDriver(NameCoder nameCoder)
          Construct an AbstractXppDriver.
 
Method Summary
protected abstract  org.xmlpull.v1.XmlPullParser createParser()
          Create the parser of the XPP implementation.
 HierarchicalStreamReader createReader(InputStream in)
          Create the HierarchicalStreamReader with the stream parser reading from the input stream.
 HierarchicalStreamReader createReader(Reader in)
          Create the HierarchicalStreamReader with the stream parser reading from the IO reader.
 HierarchicalStreamWriter createWriter(OutputStream out)
          Create the HierarchicalStreamWriter with the formatted writer.
 HierarchicalStreamWriter createWriter(Writer out)
          Create the HierarchicalStreamWriter with the formatted writer.
 
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlDriver
xmlFriendlyReplacer
 
Methods inherited from class com.thoughtworks.xstream.io.AbstractDriver
createReader, createReader, getNameCoder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractXppDriver

public AbstractXppDriver(NameCoder nameCoder)
Construct an AbstractXppDriver.

Parameters:
nameCoder - the replacer for XML friendly tag and attribute names
Since:
1.4
Method Detail

createReader

public HierarchicalStreamReader createReader(Reader in)
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.

Parameters:
in - the Reader with the data to parse
Returns:
the HierarchicalStreamReader

createReader

public HierarchicalStreamReader createReader(InputStream in)
Create the HierarchicalStreamReader with the stream parser reading from the input stream.

Parameters:
in - the InputStream with the data to parse

createWriter

public HierarchicalStreamWriter createWriter(Writer out)
Create the HierarchicalStreamWriter with the formatted writer.

Parameters:
out - the Writer to receive the formatted data
Returns:
the HierarchicalStreamWriter

createWriter

public HierarchicalStreamWriter createWriter(OutputStream out)
Create the HierarchicalStreamWriter with the formatted writer.

Parameters:
out - the OutputStream to receive the formatted data
Returns:
the HierarchicalStreamWriter

createParser

protected abstract org.xmlpull.v1.XmlPullParser createParser()
                                                      throws org.xmlpull.v1.XmlPullParserException
Create the parser of the XPP implementation.

Throws:
org.xmlpull.v1.XmlPullParserException - if the parser cannot be created
Since:
1.4


Copyright © 2004-2014 XStream. All Rights Reserved.