Top Description Fields Constructors Methods
com.thoughtworks.xstream.io

public abstract Class AbstractDriver

extends Object
implements HierarchicalStreamDriver
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.io.HierarchicalStreamDriver
Known Direct Subclasses
com.thoughtworks.xstream.io.binary.BinaryStreamDriver, com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver, com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver, com.thoughtworks.xstream.io.xml.AbstractXmlDriver, com.thoughtworks.xstream.io.xml.JDom2Driver
Imports
java.io.File, .FileInputStream, .FileNotFoundException, .IOException, .InputStream, java.net.URL, com.thoughtworks.xstream.io.naming.NameCoder, .NoNameCoder

Abstract base class for all HierarchicalStreamDriver implementations. Implementations of HierarchicalStreamDriver should rather be derived from this class then implementing the interface directly.
Author
Jörg Schaible
Since
1.4

Field Summary

Modifier and TypeField and Description
private NameCoder

Constructor Summary

AccessConstructor and Description
public
AbstractDriver()

Creates an AbstractDriver with a NameCoder that does nothing.

public
AbstractDriver(NameCoder
the name coder for the target format
nameCoder
)

Creates an AbstractDriver with a provided NameCoder.

Method Summary

Modifier and TypeMethod and Description
public HierarchicalStreamReader
createReader(URL
the URL defining the location with the data to parse
in
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from a URL.
public HierarchicalStreamReader
createReader(File
the URL defining the location with the data to parse
in
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from a File.
protected NameCoder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

replacerback to summary
private NameCoder replacer

Constructor Detail

AbstractDriverback to summary
public AbstractDriver()

Creates an AbstractDriver with a NameCoder that does nothing.

AbstractDriverback to summary
public AbstractDriver(NameCoder nameCoder)

Creates an AbstractDriver with a provided NameCoder.

Parameters
nameCoder:NameCoder

the name coder for the target format

Method Detail

createReaderback to summary
public HierarchicalStreamReader createReader(URL in)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from a URL. Depending on the parser implementation, some might take the URL as SystemId to resolve additional references.

Parameters
in:URL

the URL defining the location with the data to parse

Returns:HierarchicalStreamReader

the HierarchicalStreamReader

createReaderback to summary
public HierarchicalStreamReader createReader(File in)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamDriver.createReader.

Create the HierarchicalStreamReader with the stream parser reading from a File. Depending on the parser implementation, some might take the file path as SystemId to resolve additional references.

Parameters
in:File

the URL defining the location with the data to parse

Returns:HierarchicalStreamReader

the HierarchicalStreamReader

getNameCoderback to summary
protected NameCoder getNameCoder()