public class FileProgressInputStream extends FilterInputStream
in| Constructor and Description |
|---|
FileProgressInputStream(JProgressBar fileProgressBar,
InputStream inputStream)
Constructs an object to monitor the progress of an input stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Overrides
FilterInputStream.close to close the progress
monitor as well as the stream. |
FileProgressMonitor |
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. |
available, mark, markSupportedpublic FileProgressInputStream(JProgressBar fileProgressBar, InputStream inputStream)
inputStream - The input stream to be monitored.fileProgressBar - the corresponding JProgressBarpublic FileProgressMonitor getProgressMonitor()
public int read()
throws IOException
FilterInputStream.read to update the progress
monitor after the read.read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
FilterInputStream.read to update the progress
monitor after the read.read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
FilterInputStream.read to update the progress
monitor after the read.read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
FilterInputStream.skip to update the progress
monitor after the skip.skip in class FilterInputStreamIOExceptionpublic void close()
throws IOException
FilterInputStream.close to close the progress
monitor as well as the stream.close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic void reset()
throws IOException
FilterInputStream.reset to reset the progress
monitor as well as the stream.reset in class FilterInputStreamIOExceptionCopyright © 2016 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK). All rights reserved.