com.icl.saxon.trax
Class Result

java.lang.Object
  |
  +--com.icl.saxon.trax.Result

public class Result
extends java.lang.Object

Acts as an holder for result tree specifications.

This class is modeled after the SAX InputSource class, except that it is for the Result target, and in addition to streams, and writers, it also can specify a DOM node to which nodes will be appended.

Open issues:

Should this be an interface?

Should this be an interface instead of a concrete class? The justification for it being a class is that it is just a bag of data, and contains no behavior of its own.


Constructor Summary
Result()
          Zero-argument default constructor.
Result(org.w3c.dom.Node n)
          Create a new output target with a character stream.
Result(java.io.OutputStream byteStream)
          Create a new output target with a byte stream.
Result(java.io.Writer characterStream)
          Create a new output target with a character stream.
 
Method Summary
 java.io.OutputStream getByteStream()
          Get the byte stream for this output target.
 java.io.Writer getCharacterStream()
          Get the character stream for this output target.
 org.w3c.dom.Node getNode()
          Get the node that will contain the result nodes.
 void setByteStream(java.io.OutputStream byteStream)
          Set the byte stream for this output target.
 void setCharacterStream(java.io.Writer characterStream)
          Set the character stream for this output target.
 void setNode(org.w3c.dom.Node node)
          Set the node that will contain the result nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Result

public Result()
Zero-argument default constructor.

Result

public Result(java.io.OutputStream byteStream)
Create a new output target with a byte stream.
Parameters:
byteStream - The raw byte stream that will contain the document.

Result

public Result(java.io.Writer characterStream)
Create a new output target with a character stream.
Parameters:
characterStream - The character stream where the results will be written.

Result

public Result(org.w3c.dom.Node n)
Create a new output target with a character stream.
Parameters:
characterStream - The character stream where the results will be written.
Method Detail

setByteStream

public void setByteStream(java.io.OutputStream byteStream)
Set the byte stream for this output target.
Parameters:
byteStream - A byte stream that will contain the result document.

getByteStream

public java.io.OutputStream getByteStream()
Get the byte stream for this output target.
Returns:
The byte stream, or null if none was supplied.

setCharacterStream

public void setCharacterStream(java.io.Writer characterStream)
Set the character stream for this output target.
Parameters:
characterStream - The character stream that will contain the result document.

getCharacterStream

public java.io.Writer getCharacterStream()
Get the character stream for this output target.
Returns:
The character stream, or null if none was supplied.

setNode

public void setNode(org.w3c.dom.Node node)
Set the node that will contain the result nodes.

getNode

public org.w3c.dom.Node getNode()
Get the node that will contain the result nodes.