net.netheos.pcsapi.bytesio
Class ProgressByteSinkStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
net.netheos.pcsapi.bytesio.ByteSinkStream
net.netheos.pcsapi.bytesio.ProgressByteSinkStream
- All Implemented Interfaces:
- Closeable, Flushable
public class ProgressByteSinkStream
- extends ByteSinkStream
Byte sink stream that reports progress in stream operations
|
Method Summary |
void |
abort()
Aborts operations with this stream (writes will stop before expected end). |
long |
getCurrentBytes()
Count the read bytes |
boolean |
isAborted()
Indicates if the sink has been aborted |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProgressByteSinkStream
public ProgressByteSinkStream(ByteSinkStream byteSinkStream,
ProgressListener listener)
getCurrentBytes
public long getCurrentBytes()
- Count the read bytes
- Returns:
- The bytes count
write
public void write(int b)
throws IOException
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Overrides:
write 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.