org.erights.e.elib.oldeio
Class NonBlockingInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--org.erights.e.elib.oldeio.NonBlockingInputStream
- public class NonBlockingInputStream
- extends FilterInputStream
Untamed:
Method Summary |
int |
read()
Enabled: Overridden to throw an IOException if no data is available() |
int |
read(byte[] b,
int off,
int len)
Enabled: Overridden to read at most available() bytes. |
long |
skip(long n)
Enabled: Overridden to skip at most available() bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NonBlockingInputStream
public NonBlockingInputStream(InputStream inp)
- Enabled:
read
public int read()
throws IOException
- Enabled: Overridden to throw an IOException if no data is available()
- Overrides:
read
in class FilterInputStream
- Returns:
- the next byte of data, or
-1
if the end of the
stream is reached.
IOException
- See Also:
java.io.FilterInputStream#in
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Enabled: Overridden to read at most available() bytes.
read(byte[]) isn't explicitly overridden since FilterInputStream
defines it in terms of read(byte[], int, int).
- Overrides:
read
in class FilterInputStream
- Parameters:
b
- the buffer into which the data is read.off
- the start offset of the data.len
- the maximum number of bytes read.
- Returns:
- the total number of bytes read into the buffer, or
-1
if there is no more data because the end of
the stream has been reached.
IOException
- See Also:
java.io.FilterInputStream#in
skip
public long skip(long n)
throws IOException
- Enabled: Overridden to skip at most available() bytes.
- Overrides:
skip
in class FilterInputStream
- Parameters:
n
- the number of bytes to be skipped.
- Returns:
- the actual number of bytes skipped.
IOException
comments?