net.netheos.pcsapi.bytesio
Class ByteSinkStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
net.netheos.pcsapi.bytesio.ByteSinkStream
- All Implemented Interfaces:
- Closeable, Flushable
- Direct Known Subclasses:
- MemoryByteSinkStream, ProgressByteSinkStream
public abstract class ByteSinkStream
- extends FilterOutputStream
ByteSinkStream are FilterOutputStream that can abort current operations
|
Constructor Summary |
protected |
ByteSinkStream(OutputStream out)
Creates a ByteSinkStream by assigning the argument out to the field
this.in so as to remember it for later use. |
|
Method Summary |
abstract void |
abort()
Aborts operations with this stream (writes will stop before expected end). |
abstract boolean |
isAborted()
Indicates if the sink has been aborted |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteSinkStream
protected ByteSinkStream(OutputStream out)
- Creates a
ByteSinkStream by assigning the argument out to the field
this.in so as to remember it for later use.
- Parameters:
out - the underlying output stream, or null if this instance is to be created without an
underlying stream.
abort
public abstract void abort()
- Aborts operations with this stream (writes will stop before expected end). Implementations may use this method to
delete temporary file or indicate some warning.
abort() must be called before close()
isAborted
public abstract boolean isAborted()
- Indicates if the sink has been aborted
- Returns:
- true if aborted, false otherwise
Copyright © 2014. All Rights Reserved.