sam.event
Class ProgressEventNotifier.PlainInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--sam.event.ProgressEventNotifier.InputStream
|
+--sam.event.ProgressEventNotifier.PlainInputStream
- Enclosing class:
- ProgressEventNotifier
- public class ProgressEventNotifier.PlainInputStream
- extends sam.event.ProgressEventNotifier.InputStream
Instance inner-class for notifying the number of bytes read from a plain InputStream
.
Method Summary |
void |
close()
|
protected void |
notifyRead(long numberOfReadBytes)
Notifies numberOfReadBytes to have been skipped |
int |
read()
|
int |
read(byte[] data,
int begin,
int length)
|
long |
skip(long length)
Skips length bytes. |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProgressEventNotifier.PlainInputStream
public ProgressEventNotifier.PlainInputStream(java.io.InputStream delegee)
notifyRead
protected void notifyRead(long numberOfReadBytes)
- Description copied from class:
sam.event.ProgressEventNotifier.InputStream
- Notifies
numberOfReadBytes
to have been skipped
- Specified by:
notifyRead
in class sam.event.ProgressEventNotifier.InputStream
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
EOFException
- if no more bytes are available
java.io.IOException
read
public int read(byte[] data,
int begin,
int length)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Returns:
- the number of bytes actually read
- Throws:
EOFException
- if no single byte is available
java.io.IOException
skip
public long skip(long length)
throws java.io.IOException
- Skips
length
bytes.
- Overrides:
skip
in class java.io.InputStream
java.io.IOException
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.InputStream
java.io.IOException