org.fuin.utils4swing.progress
Class FileCopyProgressInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.fuin.utils4swing.progress.FileCopyProgressInputStream
- All Implemented Interfaces:
- Closeable
public class FileCopyProgressInputStream
- extends FilterInputStream
Updates the attached FileCopyProgressMonitor while bytes are
read.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileCopyProgressInputStream
public FileCopyProgressInputStream(FileCopyProgressListener listener,
InputStream inputStream,
int size)
- Constructor with monitor, stream and file size.
- Parameters:
listener - Listener to inform about progress - Can be null
but makes not much sense to use this class in this case.inputStream - Input stream to use.size - Size of the input stream.
read
public final int read()
throws IOException
-
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public final int read(byte[] b)
throws IOException
-
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public final int read(byte[] b,
int off,
int len)
throws IOException
-
- Overrides:
read in class FilterInputStream
- Throws:
IOException
skip
public final long skip(long n)
throws IOException
-
- Overrides:
skip in class FilterInputStream
- Throws:
IOException
close
public final void close()
throws IOException
-
- Specified by:
close in interface Closeable- Overrides:
close in class FilterInputStream
- Throws:
IOException
reset
public final void reset()
throws IOException
-
- Overrides:
reset in class FilterInputStream
- Throws:
IOException
Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.