Package com.thoughtworks.xstream.io.xml
Class XomDriver
- java.lang.Object
-
- com.thoughtworks.xstream.io.AbstractDriver
-
- com.thoughtworks.xstream.io.xml.AbstractXmlDriver
-
- com.thoughtworks.xstream.io.xml.XomDriver
-
- All Implemented Interfaces:
HierarchicalStreamDriver
public class XomDriver extends AbstractXmlDriver
-
-
Field Summary
Fields Modifier and Type Field Description private nu.xom.Builder
builder
-
Constructor Summary
Constructors Constructor Description XomDriver()
XomDriver(NameCoder nameCoder)
XomDriver(XmlFriendlyReplacer replacer)
Deprecated.As of 1.4, useXomDriver(NameCoder)
insteadXomDriver(nu.xom.Builder builder)
Deprecated.As of 1.4.9, useXomDriver()
and overloadcreateBuilder()
insteadXomDriver(nu.xom.Builder builder, NameCoder nameCoder)
Deprecated.As of 1.4.9, useXomDriver(NameCoder)
and overloadcreateBuilder()
insteadXomDriver(nu.xom.Builder builder, XmlFriendlyReplacer replacer)
Deprecated.As of 1.4, useXomDriver(NameCoder)
and overloadcreateBuilder()
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected nu.xom.Builder
createBuilder()
Create the Builder instance.HierarchicalStreamReader
createReader(java.io.File in)
Create the HierarchicalStreamReader with the stream parser reading from a File.HierarchicalStreamReader
createReader(java.io.InputStream in)
Create the HierarchicalStreamReader with the stream parser reading from the input stream.HierarchicalStreamReader
createReader(java.io.Reader text)
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.HierarchicalStreamReader
createReader(java.net.URL in)
Create the HierarchicalStreamReader with the stream parser reading from a URL.HierarchicalStreamWriter
createWriter(java.io.OutputStream out)
Create the HierarchicalStreamWriter with the formatted writer.HierarchicalStreamWriter
createWriter(java.io.Writer out)
Create the HierarchicalStreamWriter with the formatted writer.protected nu.xom.Builder
getBuilder()
Deprecated.As of 1.4.9, overloadcreateBuilder()
instead-
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlDriver
xmlFriendlyReplacer
-
Methods inherited from class com.thoughtworks.xstream.io.AbstractDriver
getNameCoder
-
-
-
-
Constructor Detail
-
XomDriver
public XomDriver()
-
XomDriver
public XomDriver(nu.xom.Builder builder)
Deprecated.As of 1.4.9, useXomDriver()
and overloadcreateBuilder()
instead
-
XomDriver
public XomDriver(NameCoder nameCoder)
- Since:
- 1.4
-
XomDriver
public XomDriver(nu.xom.Builder builder, NameCoder nameCoder)
Deprecated.As of 1.4.9, useXomDriver(NameCoder)
and overloadcreateBuilder()
instead- Since:
- 1.4
-
XomDriver
public XomDriver(XmlFriendlyReplacer replacer)
Deprecated.As of 1.4, useXomDriver(NameCoder)
instead- Since:
- 1.2
-
XomDriver
public XomDriver(nu.xom.Builder builder, XmlFriendlyReplacer replacer)
Deprecated.As of 1.4, useXomDriver(NameCoder)
and overloadcreateBuilder()
instead- Since:
- 1.2
-
-
Method Detail
-
getBuilder
protected nu.xom.Builder getBuilder()
Deprecated.As of 1.4.9, overloadcreateBuilder()
instead
-
createBuilder
protected nu.xom.Builder createBuilder()
Create the Builder instance. A XOM builder is a wrapper around aXMLReader
instance which is not thread-safe by definition. Therefore each reader should use its own builder instance to avoid concurrency problems. Overload this method to configure the generated builder instances e.g. to activate validation.- Returns:
- the new builder
- Since:
- 1.4.9
-
createReader
public HierarchicalStreamReader createReader(java.io.Reader text)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.- Parameters:
text
- theReader
with the data to parse- Returns:
- the HierarchicalStreamReader
-
createReader
public HierarchicalStreamReader createReader(java.io.InputStream in)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the input stream.- Parameters:
in
- theInputStream
with the data to parse
-
createReader
public HierarchicalStreamReader createReader(java.net.URL in)
Description copied from class:AbstractDriver
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:
createReader
in interfaceHierarchicalStreamDriver
- Overrides:
createReader
in classAbstractDriver
- Parameters:
in
- theURL
defining the location with the data to parse- Returns:
- the HierarchicalStreamReader
-
createReader
public HierarchicalStreamReader createReader(java.io.File in)
Description copied from class:AbstractDriver
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:
createReader
in interfaceHierarchicalStreamDriver
- Overrides:
createReader
in classAbstractDriver
- Parameters:
in
- theURL
defining the location with the data to parse- Returns:
- the HierarchicalStreamReader
-
createWriter
public HierarchicalStreamWriter createWriter(java.io.Writer out)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.- Parameters:
out
- theWriter
to receive the formatted data- Returns:
- the HierarchicalStreamWriter
-
createWriter
public HierarchicalStreamWriter createWriter(java.io.OutputStream out)
Description copied from interface:HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.- Parameters:
out
- theOutputStream
to receive the formatted data- Returns:
- the HierarchicalStreamWriter
-
-