public class ProgressInputStream extends java.io.InputStream
Modifier and Type | Field and Description |
---|---|
private java.io.InputStream |
in |
private StreamProgressUpdater |
updater |
Constructor and Description |
---|
ProgressInputStream(java.io.InputStream in,
long size,
ProgressMonitor progressMonitor)
Constructs a new
ProgressInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
private final StreamProgressUpdater updater
private final java.io.InputStream in
public ProgressInputStream(java.io.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 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