public class ProgressOutputStream extends OutputStream
Constructor and Description |
---|
ProgressOutputStream(OutputStream wrapper) |
ProgressOutputStream(OutputStream wrapper,
ByteTransferProgress progress) |
ProgressOutputStream(OutputStream wrapper,
long end) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
finish() |
void |
finish(boolean error)
完成
|
void |
flush() |
ByteTransferProgress |
getProgress() |
void |
setEnd(long end)
设置结束
|
void |
setProgress(ByteTransferProgress progress) |
void |
start()
开始
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public ProgressOutputStream(OutputStream wrapper)
public ProgressOutputStream(OutputStream wrapper, long end)
public ProgressOutputStream(OutputStream wrapper, ByteTransferProgress progress)
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void start()
public void setEnd(long end)
end
- 结束public void finish()
public void finish(boolean error)
error
- 是否失败public ByteTransferProgress getProgress()
public void setProgress(ByteTransferProgress progress)
Copyright © 2024. All rights reserved.