org.fuin.utils4swing.progress
Class FileCopyProgressInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.fuin.utils4swing.progress.FileCopyProgressInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class FileCopyProgressInputStream
- extends java.io.FilterInputStream
Updates the attached FileCopyProgressMonitor while bytes are
read.
| Fields inherited from class java.io.FilterInputStream |
in |
| 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 |
FileCopyProgressInputStream
public FileCopyProgressInputStream(FileCopyProgressListener listener,
java.io.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 java.io.IOException
-
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public final int read(byte[] b)
throws java.io.IOException
-
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public final int read(byte[] b,
int off,
int len)
throws java.io.IOException
-
- Overrides:
read in class java.io.FilterInputStream
- Throws:
java.io.IOException
skip
public final long skip(long n)
throws java.io.IOException
-
- Overrides:
skip in class java.io.FilterInputStream
- Throws:
java.io.IOException
close
public final void close()
throws java.io.IOException
-
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.FilterInputStream
- Throws:
java.io.IOException
reset
public final void reset()
throws java.io.IOException
-
- Overrides:
reset in class java.io.FilterInputStream
- Throws:
java.io.IOException
Copyright © 2009 Future Invent Informationsmanagement GmbH. All Rights Reserved.