de.smartics.testdoc.core.export
Class FileOutputManager

Package class diagram package FileOutputManager
java.lang.Object
  extended by de.smartics.testdoc.core.export.AbstractOutputManager
      extended by de.smartics.testdoc.core.export.FileOutputManager
All Implemented Interfaces:
OutputManager

public class FileOutputManager
     
     
extends AbstractOutputManager

Writes to files.

Author:
Robert Reiner

Field Summary
 
Fields inherited from class de.smartics.testdoc.core.export.AbstractOutputManager
exporter
 
Constructor Summary
FileOutputManager(File rootDir, UnitTestDocExporter exporter)
          Default constructor.
 
Method Summary
protected  OutputStream openStreamFor(UnitTestDoc testDoc)
          Creates a stream to write the given document to.
 
Methods inherited from class de.smartics.testdoc.core.export.AbstractOutputManager
export, finish, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOutputManager

public FileOutputManager(File rootDir,
                         UnitTestDocExporter exporter)
Default constructor.

Parameters:
rootDir - the root directory to which the generated files are written.
exporter - the exporter that knows the format of the file to be written.
Method Detail

openStreamFor

protected OutputStream openStreamFor(UnitTestDoc testDoc)
                              throws IOException,
                                     NullPointerException
Creates a stream to write the given document to.

Specified by:
openStreamFor in class AbstractOutputManager
Parameters:
testDoc - the documentation to open a stream to write it to.
Returns:
the opened stream. The client is responsible to close it.
Throws:
IOException - if the stream cannot be opened.
NullPointerException - if testDoc is null.


Copyright © 2010-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.