public class ProgressOutputStream extends OutputStream
OutputStream
which reports progress to the ProgressMonitor
.Modifier and Type | Field and Description |
---|---|
private OutputStream |
out |
private StreamProgressUpdater |
updater |
Constructor and Description |
---|
ProgressOutputStream(OutputStream out,
long size,
ProgressMonitor progressMonitor)
Constructs a new
ProgressOutputStream . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush, write
private final StreamProgressUpdater updater
private final OutputStream out
public ProgressOutputStream(OutputStream out, long size, ProgressMonitor progressMonitor)
ProgressOutputStream
.out
- the stream to monitorsize
- the total size which will be sentprogressMonitor
- the monitor to report topublic void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException