com.ddtek.xmlconverter
Class OutputStreamSource

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

public class OutputStreamSource
extends Object
implements Source

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


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

Constructor Detail

OutputStreamSource

public OutputStreamSource()
Create an empty OutputStreamSource. After starting the conversion, the caller should call getOutputStream to get the OutputStream.

Method Detail

getSystemId

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

Specified by:
getSystemId in interface Source

getOutputStream

public OutputStream getOutputStream()
Get the OutputStream, which is used to write the source data.

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

Returns:
The OutputStream.