Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

nice.tools.testsuite.output
Class AbstractOutput  view AbstractOutput download AbstractOutput.java

java.lang.Object
  extended bynice.tools.testsuite.output.AbstractOutput
All Implemented Interfaces:
Output
Direct Known Subclasses:
HtmlOutput, TextOutput

public abstract class AbstractOutput
extends java.lang.Object
implements Output

Abstract representation of the test engine output. This class holds a reference to the underlying writer.

Version:
$Id: AbstractOutput.java,v 1.4 2002/09/07 21:05:04 agreif Exp $

Field Summary
private  OutputWriter _writer
          Wrapper around the original writer.
 
Constructor Summary
AbstractOutput(java.io.Writer out)
          Creates an instance of AbstractWriter with the underlying writer.
 
Method Summary
 void close()
          Closes the writer of the writer of this output.
protected  void flush()
          Flushes the writer of this output.
protected  java.lang.String getIndent()
          Returns the indentation as string that should be used in this output format.
protected  java.lang.String getLineBreak()
          Returns the line break that is specific to this output.
 void log(java.lang.String statement)
          Logs a statement to this Output.
 void log(java.lang.String prefix, java.lang.String statement)
          Logs a statement with the given prefix in angled braces.
 void logAndFlush(java.lang.String statement)
          Logs a statement to this output and flushes the writer.
 void logAndFlush(java.lang.String prefix, java.lang.String statement)
          Logs a statement with the given prefix in angled braces and flushes the writer.
protected  void mark()
          Marks the current position in the buffer of the writer of this output.
protected  void reset()
          Resets the buffer to the writer to the marked position.
private  void write(java.lang.String str)
          Writes a string to the writer of this output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nice.tools.testsuite.output.Output
endApplication, endTestCase, endTestSuite, startApplication, startTestCase, startTestSuite
 

Field Detail

_writer

private OutputWriter _writer
Wrapper around the original writer.

Constructor Detail

AbstractOutput

public AbstractOutput(java.io.Writer out)
Creates an instance of AbstractWriter with the underlying writer.

Method Detail

write

private void write(java.lang.String str)
Writes a string to the writer of this output.


mark

protected void mark()
Marks the current position in the buffer of the writer of this output.


reset

protected void reset()
Resets the buffer to the writer to the marked position.


close

public void close()
Closes the writer of the writer of this output.

Specified by:
close in interface Output

flush

protected void flush()
Flushes the writer of this output.


log

public void log(java.lang.String statement)
Logs a statement to this Output.

Specified by:
log in interface Output

log

public void log(java.lang.String prefix,
                java.lang.String statement)
Logs a statement with the given prefix in angled braces.

Specified by:
log in interface Output

logAndFlush

public void logAndFlush(java.lang.String statement)
Logs a statement to this output and flushes the writer.

Specified by:
logAndFlush in interface Output

logAndFlush

public void logAndFlush(java.lang.String prefix,
                        java.lang.String statement)
Logs a statement with the given prefix in angled braces and flushes the writer.

Specified by:
logAndFlush in interface Output

getLineBreak

protected java.lang.String getLineBreak()
Returns the line break that is specific to this output. Default is the unix type linebreak


getIndent

protected java.lang.String getIndent()
Returns the indentation as string that should be used in this output format. The daultvalue is an empty string.