GeezerVison is showing docs.oracle.com — ProgressMonitorInputStream (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
javax.swing
Class ProgressMonitorInputStream
-
-
Method Summary
All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
void |
close() |
Overrides FilterInputStream.close
to close the progress monitor as well as the stream.
|
ProgressMonitor |
getProgressMonitor() |
Get the ProgressMonitor object being used by this stream.
|
int |
read() |
Overrides FilterInputStream.read
to update the progress monitor after the read.
|
int |
read(byte[] b) |
Overrides FilterInputStream.read
to update the progress monitor after the read.
|
int |
read(byte[] b,
int off,
int len) |
Overrides FilterInputStream.read
to update the progress monitor after the read.
|
void |
reset() |
Overrides FilterInputStream.reset
to reset the progress monitor as well as the stream.
|
long |
skip(long n) |
Overrides FilterInputStream.skip
to update the progress monitor after the skip.
|
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ProgressMonitorInputStream
public ProgressMonitorInputStream(Component parentComponent,
Object message,
InputStream in)
Constructs an object to monitor the progress of an input stream.
- Parameters:
message - Descriptive text to be placed in the dialog box
if one is popped up.
parentComponent - The component triggering the operation
being monitored.
in - The input stream to be monitored.
-
Method Detail
-
getProgressMonitor
public ProgressMonitor getProgressMonitor()
Get the ProgressMonitor object being used by this stream. Normally
this isn't needed unless you want to do something like change the
descriptive text partway through reading the file.
- Returns:
- the ProgressMonitor object used by this object
-
read
public int read(byte[] b,
int off,
int len)
throws IOException
Overrides FilterInputStream.read
to update the progress monitor after the read.
- Overrides:
read in class FilterInputStream
- Parameters:
b - the buffer into which the data is read.
off - the start offset in the destination array b
len - the maximum number of bytes read.
- Returns:
- the total number of bytes read into the buffer, or
-1 if there is no more data because the end of
the stream has been reached.
- Throws:
IOException - if an I/O error occurs.
- See Also:
FilterInputStream.in
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|