unit
Class FileRedirection

java.lang.Object
  |
  +--unit.FileRedirection

public class FileRedirection
extends java.lang.Object

Just a helper class, that allows simple inclusion of files into the output of a UniT.


Constructor Summary
FileRedirection()
           
 
Method Summary
static void redirectFileToWriter(java.lang.String fileName, java.io.Writer target)
          Opens a file specified by the passed name and directs its content to the passed Writer object, that could be the predefined out object of UniT.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRedirection

public FileRedirection()
Method Detail

redirectFileToWriter

public static void redirectFileToWriter(java.lang.String fileName,
                                        java.io.Writer target)
                                 throws java.io.FileNotFoundException,
                                        java.io.IOException
Opens a file specified by the passed name and directs its content to the passed Writer object, that could be the predefined out object of UniT.
Parameters:
fileName - the name of the file, that should be redirected
target - the Writer object, to which the file content should be directed, usually the predefined out object of UniT.
Throws:
java.io.FileNotFoundException - if the fileName can not be resolved
java.io.IOException - if the file content can not be read