net.incongru.wiseio
Class Output<T extends java.io.Closeable & java.io.Flushable>
java.lang.Object
net.incongru.wiseio.ClosingIO<T>
net.incongru.wiseio.Output<T>
- All Implemented Interfaces:
- IO<T>
public class Output<T extends java.io.Closeable & java.io.Flushable>
- extends ClosingIO<T>
Executes an operation, flushes the stream as required, closes the stream, wraps exceptions as needed.
- Version:
- $Revision: $ ($Author: $)
- Author:
- gjoseph
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Output
public Output(T flow,
IOOperation op)
withFlush
public Output<T> withFlush()
withFlushWhenSuccessful
public Output<T> withFlushWhenSuccessful()
exec
protected void exec(T flow,
IOOperation op)
throws java.io.IOException
- Overrides:
exec in class ClosingIO<T extends java.io.Closeable & java.io.Flushable>
- Throws:
java.io.IOException
cleanupAndProcessException
protected java.io.IOException cleanupAndProcessException(java.io.IOException e,
T flow)
- Description copied from class:
ClosingIO
- Do your business here. Since the flow is created outside the scope of the ClosingIO instance,
you have access to it, we don't need to pass it around.
- Overrides:
cleanupAndProcessException in class ClosingIO<T extends java.io.Closeable & java.io.Flushable>
Copyright © 2009. All Rights Reserved.