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. |
ProgressInputStream(URLConnection con,
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, skipprivate 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 ProgressInputStream(URLConnection con, ProgressMonitor progressMonitor) throws OsmTransferException
ProgressInputStream.
Will call URLConnection.getInputStream() to obtain the stream to monitor.con - the connection to monitorprogressMonitor - the monitor to report toOsmTransferException - if any I/O error occurspublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int read(byte[] b, int off, int len) throws IOException
read in class InputStreamIOExceptionpublic int read() throws IOException
read in class InputStreamIOException