public class DasProgressMonitorInputStream
extends java.io.FilterInputStream
Constructor and Description |
---|
DasProgressMonitorInputStream(java.io.InputStream in,
ProgressMonitor monitor)
Creates a new instance of DasProgressMonitorInputStream
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list.
|
void |
addRunWhenClosedRunnable(java.lang.Runnable run)
should an action be needed when the transaction is complete, for example
closing a network connection, this can be used.
|
void |
close()
close resources needed and set the monitor finished flag.
|
long |
getStreamLength()
the length of the stream in bytes.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the listener list.
|
void |
setEnableProgressPosition(boolean value)
disable/enable setting of progress position, true by default.
|
void |
setStreamLength(long streamLength)
set the length of the stream in bytes.
|
public DasProgressMonitorInputStream(java.io.InputStream in, ProgressMonitor monitor)
in
- the InputStream to monitor as data comes in.monitor
- the monitor to report feedbackpublic int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public void addRunWhenClosedRunnable(java.lang.Runnable run)
run
- public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException
public void setEnableProgressPosition(boolean value)
value
- public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener to add.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener to remove.public long getStreamLength()
public void setStreamLength(long streamLength)
streamLength
- the length of the stream in bytes.