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
OsmTransferException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
private void advanceTicker(int amount)
amount
- private void updateSize()