xbn.output
Class OWIntoSB

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.output.OWriter
              |
              +--xbn.output.OWIntoSB

public class OWIntoSB
extends OWriter

An OWriter where the destination is an internally-held StringBuffer. See get or getAndReset.

Source code:  MFPlain.java.

The primary use for this class is as the default OWriter in TemplateFiller


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
OWIntoSB()
          Create a OWIntoSB.
 
Method Summary
 String get()
          Get the current text stored in the internal StringBuffer.
 String getAndReset()
          Get the current text stored in the internal StringBuffer, and then delete all text from it.
 void newln()
          Add a newline only, to the internal StringBuffer.
 void reset()
          Delete all text from the internal StringBuffer.
 void write(String s_message)
          Add a line of output, with a following newline ("\n") to the internal StringBuffer.
 void writeNoln(String s_message)
          Add a line of output, without an additional newline, to the internal StringBuffer.
 
Methods inherited from class xbn.output.OWriter
isActive
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWIntoSB

public OWIntoSB()

Create a OWIntoSB. This constructor does nothing.

Method Detail

write

public void write(String s_message)

Add a line of output, with a following newline ("\n") to the internal StringBuffer.

Equal to writeNoln(s_message) then newln()

Overrides:
write in class OWriter
Following copied from class: xbn.output.OWriter
Parameters:
s_message - The message to output.

writeNoln

public void writeNoln(String s_message)

Add a line of output, without an additional newline, to the internal StringBuffer.

Equal to [internal StringBuffer].append(s_message)

Overrides:
writeNoln in class OWriter
Parameters:
s_message - The string to add.

newln

public void newln()

Add a newline only, to the internal StringBuffer.

Equal to writeNoln("\n")

Overrides:
newln in class OWriter

get

public String get()

Get the current text stored in the internal StringBuffer.


reset

public void reset()

Delete all text from the internal StringBuffer.

Equal to [internal StringBuffer variable] = new StringBuffer("")


getAndReset

public String getAndReset()

Get the current text stored in the internal StringBuffer, and then delete all text from it.

This function first calls get and then reset.




Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo