com.thoughtworks.xstream.io.xml
Class Dom4JDriver

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.Dom4JDriver
All Implemented Interfaces:
HierarchicalStreamDriver

public class Dom4JDriver
extends AbstractXmlDriver


Constructor Summary
Dom4JDriver()
           
Dom4JDriver(org.dom4j.DocumentFactory documentFactory, org.dom4j.io.OutputFormat outputFormat)
           
Dom4JDriver(org.dom4j.DocumentFactory documentFactory, org.dom4j.io.OutputFormat outputFormat, NameCoder nameCoder)
           
Dom4JDriver(org.dom4j.DocumentFactory documentFactory, org.dom4j.io.OutputFormat outputFormat, XmlFriendlyReplacer replacer)
          Deprecated. As of 1.4, use Dom4JDriver(DocumentFactory, OutputFormat, NameCoder) instead.
Dom4JDriver(NameCoder nameCoder)
           
 
Method Summary
 HierarchicalStreamReader createReader(File in)
          Create the HierarchicalStreamReader with the stream parser reading from a File.
 HierarchicalStreamReader createReader(InputStream in)
          Create the HierarchicalStreamReader with the stream parser reading from the input stream.
 HierarchicalStreamReader createReader(Reader text)
          Create the HierarchicalStreamReader with the stream parser reading from the IO reader.
 HierarchicalStreamReader createReader(URL in)
          Create the HierarchicalStreamReader with the stream parser reading from a URL.
 HierarchicalStreamWriter createWriter(OutputStream out)
          Create the HierarchicalStreamWriter with the formatted writer.
 HierarchicalStreamWriter createWriter(Writer out)
          Create the HierarchicalStreamWriter with the formatted writer.
 org.dom4j.DocumentFactory getDocumentFactory()
           
 org.dom4j.io.OutputFormat getOutputFormat()
           
 void setDocumentFactory(org.dom4j.DocumentFactory documentFactory)
           
 void setOutputFormat(org.dom4j.io.OutputFormat outputFormat)
           
 
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlDriver
xmlFriendlyReplacer
 
Methods inherited from class com.thoughtworks.xstream.io.AbstractDriver
getNameCoder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dom4JDriver

public Dom4JDriver()

Dom4JDriver

public Dom4JDriver(NameCoder nameCoder)
Since:
1.4

Dom4JDriver

public Dom4JDriver(org.dom4j.DocumentFactory documentFactory,
                   org.dom4j.io.OutputFormat outputFormat)

Dom4JDriver

public Dom4JDriver(org.dom4j.DocumentFactory documentFactory,
                   org.dom4j.io.OutputFormat outputFormat,
                   NameCoder nameCoder)
Since:
1.4

Dom4JDriver

public Dom4JDriver(org.dom4j.DocumentFactory documentFactory,
                   org.dom4j.io.OutputFormat outputFormat,
                   XmlFriendlyReplacer replacer)
Deprecated. As of 1.4, use Dom4JDriver(DocumentFactory, OutputFormat, NameCoder) instead.

Since:
1.2
Method Detail

getDocumentFactory

public org.dom4j.DocumentFactory getDocumentFactory()

setDocumentFactory

public void setDocumentFactory(org.dom4j.DocumentFactory documentFactory)

getOutputFormat

public org.dom4j.io.OutputFormat getOutputFormat()

setOutputFormat

public void setOutputFormat(org.dom4j.io.OutputFormat outputFormat)

createReader

public HierarchicalStreamReader createReader(Reader text)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the IO reader.

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

createReader

public HierarchicalStreamReader createReader(InputStream in)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamReader with the stream parser reading from the input stream.

Parameters:
in - the InputStream with the data to parse

createReader

public HierarchicalStreamReader createReader(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 interface HierarchicalStreamDriver
Overrides:
createReader in class AbstractDriver
Parameters:
in - the URL defining the location with the data to parse
Returns:
the HierarchicalStreamReader
Since:
1.4

createReader

public HierarchicalStreamReader createReader(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 interface HierarchicalStreamDriver
Overrides:
createReader in class AbstractDriver
Parameters:
in - the URL defining the location with the data to parse
Returns:
the HierarchicalStreamReader
Since:
1.4

createWriter

public HierarchicalStreamWriter createWriter(Writer out)
Description copied from interface: HierarchicalStreamDriver
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)
Description copied from interface: HierarchicalStreamDriver
Create the HierarchicalStreamWriter with the formatted writer.

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


Copyright © 2004-2014 XStream. All Rights Reserved.