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

public Class XomDriver

extends AbstractXmlDriver
Class Inheritance
Imports
java.io.File, .IOException, .InputStream, .OutputStream, .OutputStreamWriter, .Reader, .Writer, java.net.URL, nu.xom.Builder, .Document, .ParsingException, .ValidityException, com.thoughtworks.xstream.io.HierarchicalStreamReader, .HierarchicalStreamWriter, .StreamException, com.thoughtworks.xstream.io.naming.NameCoder

Deprecated

as a consequence of AbstractXmlDriver being deprecated. See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private final Builder

Constructor Summary

AccessConstructor and Description
public
public
XomDriver(Builder builder)

Deprecated As of 1.4.9, use XomDriver() and overload createBuilder() instead
public
XomDriver(NameCoder nameCoder)

public
XomDriver(Builder builder, NameCoder nameCoder)

Deprecated As of 1.4.9, use XomDriver(NameCoder) and overload createBuilder() instead
public
XomDriver(XmlFriendlyReplacer replacer)

Deprecated As of 1.4, use XomDriver(NameCoder) instead
public
XomDriver(Builder builder, XmlFriendlyReplacer replacer)

Deprecated As of 1.4, use XomDriver(NameCoder) and overload createBuilder() instead

Method Summary

Modifier and TypeMethod and Description
protected Builder

Returns:

the new builder
createBuilder
()

Create the Builder instance.

public HierarchicalStreamReader
createReader(Reader
the Reader with the data to parse
text
)

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

Create the HierarchicalStreamReader with the stream parser reading from the IO reader.
public HierarchicalStreamReader
createReader(InputStream
the InputStream with the data to parse
in
)

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

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

Overrides com.thoughtworks.xstream.io.AbstractDriver.createReader.

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
)

Overrides com.thoughtworks.xstream.io.AbstractDriver.createReader.

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

Create the HierarchicalStreamReader with the stream parser reading from a File.
public HierarchicalStreamWriter
createWriter(final Writer
the Writer to receive the formatted data
out
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Create the HierarchicalStreamWriter with the formatted writer.
public HierarchicalStreamWriter
createWriter(final OutputStream
the OutputStream to receive the formatted data
out
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

Create the HierarchicalStreamWriter with the formatted writer.
protected Builder
getBuilder()

Deprecated As of 1.4.9, overload createBuilder() instead
Inherited from com.thoughtworks.xstream.io.xml.AbstractXmlDriver:
xmlFriendlyReplacer

Field Detail

builderback to summary
private final Builder builder

Constructor Detail

XomDriverback to summary
public XomDriver()
XomDriverback to summary
public XomDriver(Builder builder)

Deprecated

As of 1.4.9, use XomDriver() and overload createBuilder() instead

XomDriverback to summary
public XomDriver(NameCoder nameCoder)
Since
1.4
XomDriverback to summary
public XomDriver(Builder builder, NameCoder nameCoder)

Deprecated

As of 1.4.9, use XomDriver(NameCoder) and overload createBuilder() instead

Since
1.4
XomDriverback to summary
public XomDriver(XmlFriendlyReplacer replacer)

Deprecated

As of 1.4, use XomDriver(NameCoder) instead

Since
1.2
XomDriverback to summary
public XomDriver(Builder builder, XmlFriendlyReplacer replacer)

Deprecated

As of 1.4, use XomDriver(NameCoder) and overload createBuilder() instead

Since
1.2

Method Detail

createBuilderback to summary
protected Builder createBuilder()

Create the Builder instance. A XOM builder is a wrapper around a org.xml.sax.XMLReader 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:Builder

the new builder

Since
1.4.9
createReaderback to summary
public HierarchicalStreamReader createReader(Reader text)

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

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

Create the HierarchicalStreamReader with the stream parser reading from the IO reader.

Parameters
text:Reader

the Reader with the data to parse

Returns:HierarchicalStreamReader

the HierarchicalStreamReader

createReaderback to summary
public HierarchicalStreamReader createReader(InputStream 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 the input stream.

Parameters
in:InputStream

the InputStream with the data to parse

createReaderback to summary
public HierarchicalStreamReader createReader(URL in)

Overrides com.thoughtworks.xstream.io.AbstractDriver.createReader.

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

Doc from com.thoughtworks.xstream.io.AbstractDriver.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

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

the URL defining the location with the data to parse

Returns:HierarchicalStreamReader

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

the HierarchicalStreamReader

createReaderback to summary
public HierarchicalStreamReader createReader(File in)

Overrides com.thoughtworks.xstream.io.AbstractDriver.createReader.

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

Doc from com.thoughtworks.xstream.io.AbstractDriver.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

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

the URL defining the location with the data to parse

Returns:HierarchicalStreamReader

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

the HierarchicalStreamReader

createWriterback to summary
public HierarchicalStreamWriter createWriter(final Writer out)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

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

Create the HierarchicalStreamWriter with the formatted writer.

Parameters
out:Writer

the Writer to receive the formatted data

Returns:HierarchicalStreamWriter

the HierarchicalStreamWriter

createWriterback to summary
public HierarchicalStreamWriter createWriter(final OutputStream out)

Implements com.thoughtworks.xstream.io.HierarchicalStreamDriver.createWriter.

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

Create the HierarchicalStreamWriter with the formatted writer.

Parameters
out:OutputStream

the OutputStream to receive the formatted data

Returns:HierarchicalStreamWriter

the HierarchicalStreamWriter

getBuilderback to summary
protected Builder getBuilder()

Deprecated

As of 1.4.9, overload createBuilder() instead