spec.io
Class ValidityCheckOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by spec.io.ValidityCheckOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ValidityCheckOutputStream
extends java.io.OutputStream

This class implements a special from of OutputStream that is used by to validity check the output from the benchmarks. Data is written here when spec.harness.Context.out.println() is called.


Constructor Summary
ValidityCheckOutputStream(java.lang.String benchName)
          Creates a new PrintStream.
 
Method Summary
 void createValidityFile()
          Create the valitity check file.
static java.lang.String getValidityFileName(java.lang.String bmName)
           
 boolean validityCheck(LoopResult lResults)
          Validity check the output and write any errors into the results property file
 void write(int b)
          Writes a byte.
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidityCheckOutputStream

public ValidityCheckOutputStream(java.lang.String benchName)
Creates a new PrintStream.

Parameters:
benchName - Name of benchmark.
Method Detail

write

public void write(int b)
           throws java.io.IOException
Writes a byte.

Specified by:
write in class java.io.OutputStream
Parameters:
b - the byte.
Throws:
java.io.IOException - If an I/O error has occurred.

validityCheck

public boolean validityCheck(LoopResult lResults)
Validity check the output and write any errors into the results property file

Parameters:
lResults - the bean that contains config info and will contain the errors.
Returns:
boolean, whether it is valid or not.

getValidityFileName

public static java.lang.String getValidityFileName(java.lang.String bmName)

createValidityFile

public void createValidityFile()
Create the valitity check file. This is only used in the devlopment cycle.