|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
javax.swing.ProgressMonitorInputStream
public class ProgressMonitorInputStream
An input stream with a ProgressMonitor
.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
ProgressMonitorInputStream(Component component,
Object message,
InputStream stream)
Creates a new ProgressMonitorInputStream . |
Method Summary | |
---|---|
void |
close()
Closes the input stream and the associated ProgressMonitor . |
ProgressMonitor |
getProgressMonitor()
Returns the ProgressMonitor used by this input stream. |
int |
read()
Reads an unsigned byte from the input stream and returns it as an int in the range of 0-255. |
int |
read(byte[] data)
Reads bytes from the input stream and stores them in the supplied array, and updates the progress monitor (or closes it if the end of the stream is reached). |
int |
read(byte[] data,
int offset,
int length)
Reads up to length bytes from the input stream and stores
them in the supplied array at the given index, and updates the progress
monitor (or closes it if the end of the stream is reached). |
void |
reset()
Resets the input stream to the point where FilterInputStream.mark(int) was called. |
long |
skip(long length)
Skips the specified number of bytes and updates the ProgressMonitor . |
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 |
Constructor Detail |
---|
public ProgressMonitorInputStream(Component component, Object message, InputStream stream)
ProgressMonitorInputStream
.
component
- the parent component for the progress monitor dialog.message
- the task description.stream
- the underlying input stream.Method Detail |
---|
public void reset() throws IOException
FilterInputStream.mark(int)
was called.
reset
in class FilterInputStream
IOException
- TODOpublic int read() throws IOException
int
in the range of 0-255. Returns -1 if the end of the
stream has been reached. The progress monitor is updated.
read
in class FilterInputStream
IOException
- if there is a problem reading the stream.public int read(byte[] data) throws IOException
read
in class FilterInputStream
data
- the data array for returning bytes read from the stream.
IOException
- if there is a problem reading bytes from the stream.public int read(byte[] data, int offset, int length) throws IOException
length
bytes from the input stream and stores
them in the supplied array at the given index, and updates the progress
monitor (or closes it if the end of the stream is reached).
read
in class FilterInputStream
data
- the data array for returning bytes read from the stream.offset
- the offset into the array where the bytes should be written.length
- the maximum number of bytes to read from the stream.
IOException
- if there is a problem reading bytes from the stream.public long skip(long length) throws IOException
ProgressMonitor
.
skip
in class FilterInputStream
length
- the number of bytes to skip.
IOException
- if there is a problem skipping bytes in the stream.public void close() throws IOException
ProgressMonitor
.
close
in interface Closeable
close
in class FilterInputStream
IOException
- if there is a problem closing the input stream.public ProgressMonitor getProgressMonitor()
ProgressMonitor
used by this input stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |