nu.staldal.lagoon.core
Class OutputHandler

java.lang.Object
  extended by nu.staldal.lagoon.core.OutputHandler

public abstract class OutputHandler
extends java.lang.Object

Handler for a file to be stored into a FileStorage.


Field Summary
protected  java.io.OutputStream out
           
 
Constructor Summary
protected OutputHandler(java.io.OutputStream out)
           
 
Method Summary
abstract  void commit()
          Finishing writing to a file and commits it.
abstract  void discard()
          Discards a file and delete it.
 java.io.OutputStream getOutputStream()
          Get the OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.OutputStream out
Constructor Detail

OutputHandler

protected OutputHandler(java.io.OutputStream out)
Method Detail

getOutputStream

public java.io.OutputStream getOutputStream()
Get the OutputStream.


commit

public abstract void commit()
                     throws java.io.IOException
Finishing writing to a file and commits it. Must be invoked when finished writing to the OutputStream.

Throws:
java.io.IOException

discard

public abstract void discard()
                      throws java.io.IOException
Discards a file and delete it.

Throws:
java.io.IOException