public class ProgressInputStream extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
private java.net.URLConnection |
connection |
private java.io.InputStream |
in |
private int |
lastDialogUpdate |
private ProgressMonitor |
progressMonitor |
private int |
readSoFar |
private boolean |
sizeKnown |
| Constructor and Description |
|---|
ProgressInputStream(java.net.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() |
private final java.io.InputStream in
private int readSoFar
private int lastDialogUpdate
private boolean sizeKnown
private final java.net.URLConnection connection
private final ProgressMonitor progressMonitor
public ProgressInputStream(java.net.URLConnection con, ProgressMonitor progressMonitor) throws OsmTransferException
OsmTransferExceptionpublic void close() throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b, int off, int len) throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read() throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionprivate void advanceTicker(int amount)
amount - private void updateSize()