Class AbstractDriver
java.lang.Object
com.thoughtworks.xstream.io.AbstractDriver
- All Implemented Interfaces:
HierarchicalStreamDriver
- Direct Known Subclasses:
AbstractXmlDriver, BinaryStreamDriver, JDom2Driver, JsonHierarchicalStreamDriver
Abstract base class for all HierarchicalStreamDriver implementations. Implementations of
HierarchicalStreamDriver should rather be derived from this class then implementing
the interface directly.- Since:
- 1.4
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an AbstractDriver with a NameCoder that does nothing.AbstractDriver(NameCoder nameCoder) Creates an AbstractDriver with a providedNameCoder. -
Method Summary
Modifier and TypeMethodDescriptioncreateReader(File in) Create the HierarchicalStreamReader with the stream parser reading from a File.createReader(URL in) Create the HierarchicalStreamReader with the stream parser reading from a URL.protected NameCoderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HierarchicalStreamDriver
createReader, createReader, createWriter, createWriter
-
Field Details
-
replacer
-
-
Constructor Details
-
AbstractDriver
public AbstractDriver()Creates an AbstractDriver with a NameCoder that does nothing. -
AbstractDriver
-
-
Method Details
-
getNameCoder
-
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.- Specified by:
createReaderin interfaceHierarchicalStreamDriver- Parameters:
in- theURLdefining the location with the data to parse- Returns:
- the HierarchicalStreamReader
-
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.- Specified by:
createReaderin interfaceHierarchicalStreamDriver- Parameters:
in- theURLdefining the location with the data to parse- Returns:
- the HierarchicalStreamReader
-