jfileupload.transfer.client.core
Class TriggeredInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
jfileupload.transfer.client.core.TriggeredInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class TriggeredInputStream
- extends java.io.BufferedInputStream
This class extends BufferedInputStream to provide events on data loading.
Fields inherited from class java.io.BufferedInputStream |
buf, count, marklimit, markpos, pos |
Fields inherited from class java.io.FilterInputStream |
in |
Method Summary |
protected void |
notifyListeners(long size)
Notify listeners about current data loaded. |
int |
read()
|
int |
read(byte[] b,
int offset,
int length)
|
void |
setMaxlength(long maxlength)
|
long |
skip(long bytes)
|
Methods inherited from class java.io.BufferedInputStream |
available, close, mark, markSupported, reset |
Methods inherited from class java.io.FilterInputStream |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
protected java.util.List listeners
notification
protected boolean notification
TriggeredInputStream
public TriggeredInputStream(java.io.InputStream in,
java.util.List listeners)
- Parameters:
in
-
TriggeredInputStream
public TriggeredInputStream(java.io.InputStream in,
int size,
java.util.List listeners)
- Parameters:
in
- size
-
read
public int read(byte[] b,
int offset,
int length)
throws java.io.IOException
- Overrides:
read
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
skip
public long skip(long bytes)
throws java.io.IOException
- Overrides:
skip
in class java.io.BufferedInputStream
- Throws:
java.io.IOException
notifyListeners
protected void notifyListeners(long size)
- Notify listeners about current data loaded.
- Parameters:
size
-
setMaxlength
public void setMaxlength(long maxlength)