Inherited by seda.nbio.NonblockingSocketInputStream.
The only additional method is nbRead() which performs a nonblocking read of one byte. The read(byte[]) and read(byte[], int, int) methods are also nonblocking. The standard read(byte) call is blocking as there is no way to indicate that nothing was read (a -1 means an error occurred).
Public Member Functions | |
abstract int | read () throws IOException |
Perform a blocking read of one byte from this input stream. | |
abstract int | nbRead () throws IOException |
Perform a non-blocking read of one byte from this input stream. | |
abstract int | read (byte b[]) throws IOException |
Perform a non-blocking read of up to b.length bytes from the underlying stream. | |
abstract int | read (byte b[], int off, int len) throws IOException |
Perform a non-blocking read of up to len bytes from the underlying stream into the byte array b starting at offset off . | |
abstract long | skip (long n) throws IOException |
Skip n bytes of input. | |
abstract int | available () throws IOException |
abstract void | close () throws IOException |
abstract int seda.nbio.NonblockingInputStream.read | ( | ) | throws IOException [pure virtual] |
Perform a blocking read of one byte from this input stream.
Returns -1 if the end of the stream has been reached. Use nbRead() to perform a non-blocking read of one byte.
Implemented in seda.nbio.NonblockingSocketInputStream.
abstract int seda.nbio.NonblockingInputStream.nbRead | ( | ) | throws IOException [pure virtual] |
Perform a non-blocking read of one byte from this input stream.
Returns -1 if no data is available, or throws an EOFException if the end of the stream has been reached. Use read() to perform a blocking read of one byte.
Implemented in seda.nbio.NonblockingSocketInputStream.
abstract int seda.nbio.NonblockingInputStream.read | ( | byte | b[] | ) | throws IOException [pure virtual] |
Perform a non-blocking read of up to b.length
bytes from the underlying stream.
Implemented in seda.nbio.NonblockingSocketInputStream.
abstract int seda.nbio.NonblockingInputStream.read | ( | byte | b[], | |
int | off, | |||
int | len | |||
) | throws IOException [pure virtual] |
Perform a non-blocking read of up to len
bytes from the underlying stream into the byte array b
starting at offset off
.
Implemented in seda.nbio.NonblockingSocketInputStream.
abstract long seda.nbio.NonblockingInputStream.skip | ( | long | n | ) | throws IOException [pure virtual] |
Skip n bytes of input.
This is a blocking operation.
Implemented in seda.nbio.NonblockingSocketInputStream.
abstract int seda.nbio.NonblockingInputStream.available | ( | ) | throws IOException [pure virtual] |
Implemented in seda.nbio.NonblockingSocketInputStream.
abstract void seda.nbio.NonblockingInputStream.close | ( | ) | throws IOException [pure virtual] |
Implemented in seda.nbio.NonblockingSocketInputStream.