Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.trax
Class Result

    java.lang.Object
      |
      +--org.apache.trax.Result

public class Result
extends java.lang.Object

Acts as an holder for a transformation result tree.

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(Node n)` Create a new output target with a DOM node.
`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.
`Node` | `getNode()` Get the node that will contain the result tree.
`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(Node node)` Set the node that will contain the result DOM tree.

Methods inherited from class java.lang.Object
`equals, 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 result will be written.

### Result

    public Result(Node n)

  Create a new output target with a DOM node.
  Parameters:
    `n` - The DOM node that will contain the result tree.

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(Node node)

  Set the node that will contain the result DOM tree.

### getNode

    public Node getNode()

  Get the node that will contain the result tree.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache XML Project. All Rights Reserved.