public class ProgressInputStream extends InputStream
| Modifier and Type | Field and Description |
|---|---|
private URLConnection |
connection |
private InputStream |
in |
private int |
lastDialogUpdate |
private ProgressMonitor |
progressMonitor |
private int |
readSoFar |
private boolean |
sizeKnown |
| Constructor and Description |
|---|
ProgressInputStream(URLConnection con,
ProgressMonitor progressMonitor) |
| Modifier and Type | Method and Description |
|---|---|
private void |
advanceTicker(int amount)
Increase ticker (progress counter and displayed text) by the given amount.
|
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
private void |
updateSize() |
available, mark, markSupported, read, reset, skipprivate final InputStream in
private int readSoFar
private int lastDialogUpdate
private boolean sizeKnown
private final URLConnection connection
private final ProgressMonitor progressMonitor
public ProgressInputStream(URLConnection con, ProgressMonitor progressMonitor) throws OsmTransferException
OsmTransferExceptionpublic 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 InputStreamIOExceptionprivate void advanceTicker(int amount)
amount - private void updateSize()