All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class spec.io.ValidityCheckOutputStream

spec.io.ConsoleOutputStream
   |
   +----spec.io.ValidityCheckOutputStream

public class ValidityCheckOutputStream
extends ConsoleOutputStream
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 which will cause the spec.io.PrintStream class to call is here. Regular PrintStream data arrives here along with valitity chech codes that show how the data should be compaired. These codes are:
 0 - Validity checking is not performed at all.
 1 - Validity check all the data
 2 - Remove '/' and '\' characters before validity checking.
 3 - Remove numbers before validity checking.
 4 - Rules 2 and 3 together.
 
These validity chech codes are injected into the regular data as the characters to . A check is made that these characters along with any other strange data is not printed accidenially

See Also:
PrintStream

Constructor Index

 o ValidityCheckOutputStream(String, String)
Creates a new PrintStream.
 o ValidityCheckOutputStream(String, String, char)
Creates a new PrintStream.

Method Index

 o createValidityFile()
Create the valitity check file.
 o setValidityCheckValue(char)
Change the validity checking value.
 o validityCheck(Properties, int)
Validity check the output and write any errors into the results property file
 o write(int)
Writes a byte.

Constructors

 o ValidityCheckOutputStream
 public ValidityCheckOutputStream(String benchName,
                                  String fileName) throws IOException
Creates a new PrintStream.

Parameters:
benchName - Name of benchmark
fileName - Name of validity check file
Throws: IOException
If an I/O error has occurred.
 o ValidityCheckOutputStream
 public ValidityCheckOutputStream(String benchName,
                                  String fileName,
                                  char defValue) throws IOException
Creates a new PrintStream.

Parameters:
benchName - Name of benchmark
fileName - Name of validity check file
defValue - the default validity check value.
Throws: IOException
If an I/O error has occurred.

Methods

 o setValidityCheckValue
 public char setValidityCheckValue(char v)
Change the validity checking value.

Parameters:
v - the value (between 0 and 8)
Returns:
the value we replaced
Overrides:
setValidityCheckValue in class ConsoleOutputStream
 o write
 public void write(int b) throws IOException
Writes a byte.

Parameters:
b - the byte
Throws: IOException
If an I/O error has occurred.
Overrides:
write in class ConsoleOutputStream
 o createValidityFile
 public void createValidityFile()
Create the valitity check file. This is only used in the devlopment cycle.

 o validityCheck
 public boolean validityCheck(Properties results,
                              int run)
Validity check the output and write any errors into the results property file

Parameters:
results - the property file to contain the errors
run - the run iteration number

All Packages  Class Hierarchy  This Package  Previous  Next  Index