Package org.opencastproject.util
Class ProgressInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.io.input.ProxyInputStream
org.opencastproject.util.ProgressInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ProgressInputStream
extends org.apache.commons.io.input.ProxyInputStream
An
InputStream that counts the number of bytes read.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.io.input.ProxyInputStream
org.apache.commons.io.input.ProxyInputStream.AbstractBuilder<T,B extends org.apache.commons.io.build.AbstractStreamBuilder<T, B>> -
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds aPropertyChangeListenerThe listener gets notified as soon as the input stream is read.longvoidmark(int readlimit) booleanintread()intread(byte[] b) intread(byte[] b, int off, int len) voidRemoves aPropertyChangeListenerThe listener gets notified as soon as the input stream is read.voidreset()longskip(long n) Methods inherited from class org.apache.commons.io.input.ProxyInputStream
afterRead, available, beforeRead, close, handleIOException, setReference, unwrapMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ProgressInputStream
-
-
Method Details
-
getTotalNumBytesRead
public long getTotalNumBytesRead() -
addPropertyChangeListener
Adds aPropertyChangeListenerThe listener gets notified as soon as the input stream is read.- Parameters:
l- thePropertyChangeListener
-
removePropertyChangeListener
Removes aPropertyChangeListenerThe listener gets notified as soon as the input stream is read.- Parameters:
l- thePropertyChangeListener
-
read
- Overrides:
readin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
read
- Overrides:
readin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
read
- Overrides:
readin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classorg.apache.commons.io.input.ProxyInputStream
-
reset
- Overrides:
resetin classorg.apache.commons.io.input.ProxyInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classorg.apache.commons.io.input.ProxyInputStream
-