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, skip
private 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
OsmTransferException
public 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
private void advanceTicker(int amount)
amount
- private void updateSize()