public class ProgressInputStream extends InputStream
Modifier and Type | Field and Description |
---|---|
private InputStream |
in |
private StreamProgressUpdater |
updater |
Constructor and Description |
---|
ProgressInputStream(InputStream in,
long size,
ProgressMonitor progressMonitor)
Constructs a new
ProgressInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
available, mark, markSupported, read, reset, skip
private final StreamProgressUpdater updater
private final InputStream in
public ProgressInputStream(InputStream in, long size, ProgressMonitor progressMonitor)
ProgressInputStream
.in
- the stream to monitor. Must not be nullsize
- the total size which will be sentprogressMonitor
- the monitor to report topublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException