com.ddtek.xmlconverter
Class WriterSource

java.lang.Object
  extended by com.ddtek.xmlconverter.WriterSource
All Implemented Interfaces:
Source

public class WriterSource
extends Object
implements Source

The class WriterSource is used to specify that the user of Converter wants to provide the source data for the conversion by writing it to a Writer.


Constructor Summary
WriterSource()
          Create an empty WriterSource.
 
Method Summary
 String getSystemId()
          Get the SystemId of the result data.
 Writer getWriter()
          Get the Writer which is used to write the source data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriterSource

public WriterSource()
Create an empty WriterSource. After starting the conversion, the caller should call getWriter to get the Writer.

Method Detail

getSystemId

public String getSystemId()
Get the SystemId of the result data. This always returns null.

Specified by:
getSystemId in interface Source

getWriter

public Writer getWriter()
Get the Writer which is used to write the source data.

If the application wants to provide the Converter source data with a Writer, it should create an empty WriterSource and pass it as the source parameter of the convert(Source, Result) method. After convert returns, the application must use getWriter() to get the Writer. The application must then write all the data to the Writer and close it. At that moment, the Converter completes converting the data.

Returns:
The Writer.