net.netheos.pcsapi.bytesio
Class MemoryByteSinkStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
net.netheos.pcsapi.bytesio.ByteSinkStream
net.netheos.pcsapi.bytesio.MemoryByteSinkStream
- All Implemented Interfaces:
- Closeable, Flushable
public class MemoryByteSinkStream
- extends ByteSinkStream
Implements the in-memory version of a byte sink stream
|
Method Summary |
void |
abort()
Aborts operations with this stream (writes will stop before expected end). |
void |
close()
|
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 |
MemoryByteSinkStream
public MemoryByteSinkStream(MemoryByteSink memoryByteSink,
ByteArrayOutputStream baos)
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class FilterOutputStream
- Throws:
IOException
abort
public void abort()
- Description copied from class:
ByteSinkStream
- 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()
- Specified by:
abort in class ByteSinkStream
isAborted
public boolean isAborted()
- Description copied from class:
ByteSinkStream
- Indicates if the sink has been aborted
- Specified by:
isAborted in class ByteSinkStream
- Returns:
- true if aborted, false otherwise
Copyright © 2014. All Rights Reserved.