xbn.output
Class OWriter

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.output.OWriter
Direct Known Subclasses:
OWEmpty, OWFile, OWIntoSB, OWSysDotOut, OWWrapper

public abstract class OWriter
extends XBNObject

Represents the "destination" where output should go. For example, you could send output to STDOUT, file or even nowhere. This class must be extended to do something.

Source code:  OWriter.java


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
OWriter()
           
 
Method Summary
 boolean isActive()
          Does this OWriter actually write output somewhere?
abstract  void newln()
          Output a newline only to the destination.
abstract  void write(String s_message)
          Output a line of text to the destination, with a newline added to the end.
abstract  void writeNoln(String s_message)
          Output a line of text to the destination.
 
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

OWriter

public OWriter()
Method Detail

write

public abstract void write(String s_message)

Output a line of text to the destination, with a newline added to the end.

See writeNoln and newln.

Parameters:
s_message - The message to output.

writeNoln

public abstract void writeNoln(String s_message)

Output a line of text to the destination. No newline is added.

See write and newln.

Parameters:
s_message - The message to output.

newln

public abstract void newln()

Output a newline only to the destination.

See write and writeNoln.


isActive

public boolean isActive()

Does this OWriter actually write output somewhere?

If your OWriter does not write output at any time, you must override this function and return false, when applicable.

Note: OWriter.isActive's version of isActive returns true.

Returns:
true If this OWriter's write, writeNoln and newln functions actually output somewhere currently.
false If the write, writeNoln and newln functions are not outputting anything currently.



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