com.softwareag.tamino.db.api.objectModel.stream
Class TStreamWriterHelper

java.lang.Object
  extended by com.softwareag.tamino.db.api.objectModel.stream.TStreamWriterHelper

public class TStreamWriterHelper
extends java.lang.Object

The TStreamWriterHelper provides clients (mainly SAX event handlers) with methodes to write easily the results from a SAX event to a Writer.

Version:
$Revision: 1.4 $
Author:
Stefan Liebig

Constructor Summary
TStreamWriterHelper(java.io.Writer writer)
          Initialzes the handler with the given character output stream..
 
Method Summary
 java.io.Writer getWriter()
          Gets the Writer on which events can be written to.
 void setWriter(java.io.Writer writer)
          Sets a new Writer on which events can be written to.
 void write(char[] ch, int start, int length)
          Write the given character array as indicated by start and length to the Writer.
 void write(java.lang.String str)
          Write the given String to the Writer.
 void writeWithPredefinedEntities(char[] ch, int start, int length)
          Write the given character array as indicated by start and length to the Writer and replaces special characters with the predefined entities.
 void writeWithPredefinedEntities(java.lang.String string)
          Write the given string to the Writer and replaces special characters with the predefined entities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TStreamWriterHelper

public TStreamWriterHelper(java.io.Writer writer)
Initialzes the handler with the given character output stream..

Method Detail

setWriter

public void setWriter(java.io.Writer writer)
Sets a new Writer on which events can be written to.


getWriter

public java.io.Writer getWriter()
Gets the Writer on which events can be written to.


write

public void write(java.lang.String str)
           throws org.xml.sax.SAXException
Write the given String to the Writer.

Throws:
org.xml.sax.SAXException

write

public void write(char[] ch,
                  int start,
                  int length)
           throws org.xml.sax.SAXException
Write the given character array as indicated by start and length to the Writer.

Throws:
org.xml.sax.SAXException

writeWithPredefinedEntities

public void writeWithPredefinedEntities(java.lang.String string)
                                 throws org.xml.sax.SAXException
Write the given string to the Writer and replaces special characters with the predefined entities.

Throws:
org.xml.sax.SAXException

writeWithPredefinedEntities

public void writeWithPredefinedEntities(char[] ch,
                                        int start,
                                        int length)
                                 throws org.xml.sax.SAXException
Write the given character array as indicated by start and length to the Writer and replaces special characters with the predefined entities.

Throws:
org.xml.sax.SAXException


Copyright (c) 2013 Software AG. All Rights Reserved.