net.netheos.pcsapi.bytesio
Class ByteSinkStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by 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


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
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.io.FilterOutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.