xbn.output
Class OWSDOAndFile

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.output.OWriter
              |
              +--xbn.output.OWFile
                    |
                    +--xbn.output.OWSDOAndFile

public class OWSDOAndFile
extends OWFile

An OWFile where the destination is System.out, and optionally to file. This is primarily used in xbn.unittest.UTRunner.

Source code:  OWSDOAndFile.java.


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
OWSDOAndFile()
          Create an OWSDOAndFile that only prints via System.out.
OWSDOAndFile(String s_fileName)
          Create an OWSDOAndFile.
OWSDOAndFile(String s_fileName, boolean b_append)
          Create an OWSDOAndFile.
 
Method Summary
 void newln()
          Write a newline only, to both standard out and file.
 void write(boolean b_sdo, boolean b_file, String s_message)
          Write a line of output to to both standard out and file.
 void write(String s_message)
          Write a line of output to to both standard out and file.
 void writeNoln(boolean b_sdo, boolean b_file, String s_message)
          Write a line of output (with no ending line break) to to both standard out and file.
 void writeNoln(String s_message)
          Write a line of output to to both standard out and file.
 
Methods inherited from class xbn.output.OWFile
activate, deactivate, finalize, getPath, isActive, isPermanentlyInactive, isPotentiallyActive, toString
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OWSDOAndFile

public OWSDOAndFile()

Create an OWSDOAndFile that only prints via System.out.

Equal to OWFile()


OWSDOAndFile

public OWSDOAndFile(String s_fileName)

Create an OWSDOAndFile.

Equal to OWFile(s_fileName)


OWSDOAndFile

public OWSDOAndFile(String s_fileName,
                    boolean b_append)

Create an OWSDOAndFile.

Equal to OWFile(s_fileName, b_append)

Method Detail

write

public void write(String s_message)

Write a line of output to to both standard out and file.

Equal to write(true, true, s_message)

Overrides:
write in class OWFile
Following copied from class: xbn.output.OWFile
Throws:
AssertException - When this object is inactive.

write

public void write(boolean b_sdo,
                  boolean b_file,
                  String s_message)

Write a line of output to to both standard out and file.

Output is written to file (via OWFile.write) only when isActive equals true.

Parameters:
b_sdo - If true, then write this message to System.out. If false, don't.
b_file - If true, then write this message to file (assuming the file is active). If false, don't.
s_message - The message to write.

writeNoln

public void writeNoln(String s_message)

Write a line of output to to both standard out and file.

Equal to writeNoln(true, true, s_message)

Overrides:
writeNoln in class OWFile
Following copied from class: xbn.output.OWFile
Throws:
AssertException - When this object is inactive.

writeNoln

public void writeNoln(boolean b_sdo,
                      boolean b_file,
                      String s_message)

Write a line of output (with no ending line break) to to both standard out and file.

Output is written to file (via OWFile.writeNoln) only when isActive equals true.

Parameters:
b_sdo - If true, then write this message to System.out. If false, don't.
b_file - If true, then write this message to file (assuming the file is active). If false, don't.
s_message - The message to write.

newln

public void newln()

Write a newline only, to both standard out and file.

Output is written to file (via OWFile.newln) only when isActive equals true.

Overrides:
newln in class OWFile
Following copied from class: xbn.output.OWFile
Throws:
AssertException - When this object is inactive.



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