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 OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic 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 © 2025. All rights reserved.