@PublicApi @NotThreadSafe public abstract class FileOutStream 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 |
---|
FileOutStream() |
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.CountingOutputStream
public void cancel() throws IOException
cancel
in interface Cancelable
IOException
Copyright © 2023. All Rights Reserved.