|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
net.sourceforge.java.util.io.ProgressMonitorInputStream
InputStream extension that is bindable to a
IProgressMonitor to report the progress of a read operation.
| Field Summary | |
private int |
bytesRead
The number of bytes read |
private IProgressMonitor |
monitor
The IProgressMonitor to report the reading status to
|
private int |
totalBytes
The total number of bytes to be read |
| Fields inherited from class java.io.FilterInputStream |
in |
| Fields inherited from class java.io.InputStream |
|
| Constructor Summary | |
ProgressMonitorInputStream(InputStream in,
IProgressMonitor monitor)
Creates a new ProgressMonitorInputStream to monitor the
progress of the specified InputStream and report the
progress status to the specified IProgressMonitor.
|
|
ProgressMonitorInputStream(InputStream in,
IProgressMonitor monitor,
long size)
Creates a new ProgressMonitorInputStream to monitor the
progress of the specified InputStream and report the
progress status to the specified IProgressMonitor.
|
|
| Method Summary | |
void |
close()
Overrides FilterInputStream.close() to close the
IProgressMonitor as well as the InputStream.
|
int |
read()
Overrides FilterInputStream.read() to update the
IProgressMonitor after the read operation.
|
int |
read(byte[] buffer)
Overrides FilterInputStream.read(byte[]) to update the
IProgressMonitor after the read operation.
|
int |
read(byte[] buffer,
int off,
int len)
Overrides FilterInputStream.read(byte[], int, int) to
update the IProgressMonitor after the read operation.
|
void |
reset()
Overrides FilterInputStream.reset() to reset the
IProgressMonitor as well as the InputStream.
|
long |
skip(long n)
Overrides FilterInputStream.skip(long) to update the
progress monitor after the skip operation.
|
| Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private IProgressMonitor monitor
The IProgressMonitor to report the reading status to
private int bytesRead
The number of bytes read
private int totalBytes
The total number of bytes to be read
| Constructor Detail |
public ProgressMonitorInputStream(InputStream in,
IProgressMonitor monitor)
Creates a new ProgressMonitorInputStream to monitor the
progress of the specified InputStream and report the
progress status to the specified IProgressMonitor.
in - the InputStream to monitormonitor - the IProgressMonitor to report the
progress status to
public ProgressMonitorInputStream(InputStream in,
IProgressMonitor monitor,
long size)
Creates a new ProgressMonitorInputStream to monitor the
progress of the specified InputStream and report the
progress status to the specified IProgressMonitor.
in - the InputStream to monitormonitor - the IProgressMonitor to report the
progress status tosize - the size in bytes of the InputStream| Method Detail |
public int read()
throws IOException
Overrides FilterInputStream.read() to update the
IProgressMonitor after the read operation.
IOException - if an io error occured during the read operation
public int read(byte[] buffer)
throws IOException
Overrides FilterInputStream.read(byte[]) to update the
IProgressMonitor after the read operation.
buffer - the buffer to read into
IOException - if an io error occured during the read operation
public int read(byte[] buffer,
int off,
int len)
throws IOException
Overrides FilterInputStream.read(byte[], int, int) to
update the IProgressMonitor after the read operation.
buffer - the buffer to read intooff - the offset at which to start storing byte valueslen - the maximum number of bytes to read
IOException - if an io error occured during the read operation
public long skip(long n)
throws IOException
Overrides FilterInputStream.skip(long) to update the
progress monitor after the skip operation.
n - the number of bytes to skip
IllegalArgumentException - If n is negative.
IOException - if an io error occured during the skip operation
public void reset()
throws IOException
Overrides FilterInputStream.reset() to reset the
IProgressMonitor as well as the InputStream.
IOException
public void close()
throws IOException
Overrides FilterInputStream.close() to close the
IProgressMonitor as well as the InputStream.
IOException - if an io error occured during the close operation
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||