Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.thermidor.xml.output
Class StringHandler  view StringHandler download StringHandler.java

java.lang.Object
  extended bycom.thermidor.xml.output.OutputHandler
      extended bycom.thermidor.xml.output.StringHandler

public class StringHandler
extends OutputHandler

The purpose of the StringHandler is to manage/collect output into a buffer. This allows output to be collected for subsequent processesing in the parse.

Version:
1.0

Nested Class Summary
 
Nested classes inherited from class com.thermidor.xml.output.OutputHandler
OutputHandler.InvalidInitializationParameter
 
Field Summary
private  java.io.ByteArrayOutputStream _baos
          The output buffer.
 
Fields inherited from class com.thermidor.xml.output.OutputHandler
_writer, EMPTY
 
Constructor Summary
StringHandler()
          Construct a new default instance of a StringHandler.
 
Method Summary
 java.lang.String finish()
          The responsibilty of the finished member function is to handle clean up when the output is popped from the output stack.
 void handle(java.lang.String data)
          Handle the provided string data .
 void start(java.lang.Object initializationData)
          start is called on the output handler to initialize it ready to start processing output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_baos

private java.io.ByteArrayOutputStream _baos
The output buffer.

Constructor Detail

StringHandler

public StringHandler()
Construct a new default instance of a StringHandler.

Method Detail

start

public void start(java.lang.Object initializationData)
           throws OutputHandler.InvalidInitializationParameter,
                  java.io.IOException
start is called on the output handler to initialize it ready to start processing output.

Specified by:
start in class OutputHandler

handle

public void handle(java.lang.String data)
            throws java.io.IOException
Handle the provided string data .

Specified by:
handle in class OutputHandler

finish

public java.lang.String finish()
                        throws java.io.IOException
The responsibilty of the finished member function is to handle clean up when the output is popped from the output stack.

Specified by:
finish in class OutputHandler