com.unitesk.atp.text.filters
Class StringTextReceiver

java.lang.Object
  extended by com.unitesk.atp.text.filters.StringTextReceiver
All Implemented Interfaces:
TextReceiver

public class StringTextReceiver
extends Object
implements TextReceiver

Text receiver that buffers text in internal buffer and returns it as String on demand.

Version:
$Id: StringTextReceiver.java,v 1.2 2004/10/11 15:00:42 all-x Exp $
Author:
Alexey Demakov

Constructor Summary
StringTextReceiver()
          Class constructor.
 
Method Summary
 String getText()
          Gets the text currently buffered and clear buffer.
 void nl()
          Appends the line separator to the internal buffer.
 void txt(String s)
          Appends the specified string to the internal buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTextReceiver

public StringTextReceiver()
Class constructor.

Method Detail

getText

public String getText()
Gets the text currently buffered and clear buffer.

Returns:
The text currently buffered.

txt

public void txt(String s)
Appends the specified string to the internal buffer.

Specified by:
txt in interface TextReceiver
Parameters:
s - The string to write.

nl

public void nl()
Appends the line separator to the internal buffer.

Specified by:
nl in interface TextReceiver


Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.