@NotThreadSafe public abstract class AbstractOutStream extends OutputStream implements Cancelable
OutputStream as the basics, it also keeps counting
the number of bytes written to the output stream, and extends Cancelable to abort the
writes.| Modifier and Type | Field and Description |
|---|---|
protected long |
mBytesWritten
The number of bytes written.
|
| Constructor and Description |
|---|
AbstractOutStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Aborts the output stream.
|
int |
getBytesWritten()
Deprecated.
this method will not work if more than MAX_INT bytes are written; to get a count of
bytes written, wrap this stream in a counting output stream such as
org.apache.commons.io.output.CountingOutputStream |
@Deprecated public int getBytesWritten()
org.apache.commons.io.output.CountingOutputStreampublic void cancel()
throws IOException
cancel in interface CancelableIOExceptionCopyright © 2024. All Rights Reserved.