org.baselinetest
Class BaselineWriter

java.lang.Object
  extended by java.io.Writer
      extended by org.baselinetest.BaselineWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Direct Known Subclasses:
TestLogger

public class BaselineWriter
extends java.io.Writer

A helper object for writing baseline output to the appropriate file.

Author:
jwan, jsnyder2

Field Summary
static java.lang.String BASELINE_OUTPUT_PREFIX
          The prefix for baseline output files.
static java.lang.String BASELINE_OUTPUT_SUFFIX
          The suffix for baseline output files.
static java.lang.String DEFAULT_ENCODING
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
BaselineWriter()
           
BaselineWriter(TestState testState)
           
 
Method Summary
 void close()
           
 void flush()
           
 void print(boolean b)
          Add to the baseline output.
 void print(int i)
          Add to the baseline output.
 void print(long l)
          Add to the baseline output.
 void print(java.lang.Object o)
          Add to the baseline output.
 void print(short s)
          Add to the baseline output.
 void println()
          Add a CR to the baseline output.
 void println(boolean b)
          Add to the baseline output.
 void println(int i)
          Add to the baseline output.
 void println(long l)
          Add to the baseline output.
 void println(java.lang.Object o)
          Add to the baseline output.
 void println(short s)
          Add to the baseline output.
 void printlnSubstitution(java.lang.String category, java.lang.Object object)
           
 void printSubstitution(java.lang.String category, java.lang.Object object)
           
 void write(char[] cbuf, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASELINE_OUTPUT_PREFIX

public static final java.lang.String BASELINE_OUTPUT_PREFIX
The prefix for baseline output files.

See Also:
Constant Field Values

BASELINE_OUTPUT_SUFFIX

public static final java.lang.String BASELINE_OUTPUT_SUFFIX
The suffix for baseline output files.

See Also:
Constant Field Values

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values
Constructor Detail

BaselineWriter

public BaselineWriter()

BaselineWriter

public BaselineWriter(TestState testState)
Method Detail

printSubstitution

public void printSubstitution(java.lang.String category,
                              java.lang.Object object)

printlnSubstitution

public void printlnSubstitution(java.lang.String category,
                                java.lang.Object object)

println

public void println()
Add a CR to the baseline output.


print

public void print(boolean b)
Add to the baseline output.

Parameters:
b - value to be printed to the baseline.

println

public void println(boolean b)
Add to the baseline output.

Parameters:
b - value to be printed to the baseline.

print

public void print(int i)
Add to the baseline output.

Parameters:
i - value to be printed to the baseline.

println

public void println(int i)
Add to the baseline output.

Parameters:
i - value to be printed to the baseline.

print

public void print(long l)
Add to the baseline output.

Parameters:
l - value to be printed to the baseline.

println

public void println(long l)
Add to the baseline output.

Parameters:
l - value to be printed to the baseline.

print

public void print(short s)
Add to the baseline output.

Parameters:
s - value to be printed to the baseline.

println

public void println(short s)
Add to the baseline output.

Parameters:
s - value to be printed to the baseline.

print

public void print(java.lang.Object o)
Add to the baseline output. If the object is null, the String "null" will be appended.

Parameters:
o - Object to be printed to the baseline.

println

public void println(java.lang.Object o)
Add to the baseline output. If the object is null, the String "null" will be appended.

Parameters:
o - Object to be printed to the baseline.

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
Throws:
java.io.IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws java.io.IOException
Specified by:
write in class java.io.Writer
Throws:
java.io.IOException


Copyright © 2005-2009 Baseline Test. All Rights Reserved.