seda.nbio.NonblockingSocketInputStream Class Reference

Inherits seda.nbio.NonblockingInputStream.

List of all members.


Detailed Description

Package-internal class implementing NonblockingInputStream for nonblocking sockets.


Public Member Functions

int read () throws IOException
 Perform a blocking read of one byte from this input stream.
int nbRead () throws IOException
 Perform a non-blocking read of one byte from this input stream.
int read (byte b[]) throws IOException
 Perform a non-blocking read of up to b.length bytes from the underlying stream.
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.
long skip (long n) throws IOException
 Skip n bytes of input.
int available () throws IOException
void close () throws IOException

Package Functions

 NonblockingSocketInputStream (NonblockingSocketImpl impl)

Private Member Functions

native int nbSocketRead (byte b[], int off, int len) throws IOException

Private Attributes

NBIOFileDescriptor fd
boolean eof
NonblockingSocketImpl impl
byte temp [] = new byte[1]

Static Private Attributes

static final int SKIPBUFLEN = 4096


Constructor & Destructor Documentation

seda.nbio.NonblockingSocketInputStream.NonblockingSocketInputStream ( NonblockingSocketImpl  impl  )  [package]


Member Function Documentation

int seda.nbio.NonblockingSocketInputStream.available (  )  throws IOException [virtual]

Implements seda.nbio.NonblockingInputStream.

void seda.nbio.NonblockingSocketInputStream.close (  )  throws IOException [virtual]

Implements seda.nbio.NonblockingInputStream.

int seda.nbio.NonblockingSocketInputStream.nbRead (  )  throws IOException [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.

Implements seda.nbio.NonblockingInputStream.

native int seda.nbio.NonblockingSocketInputStream.nbSocketRead ( byte  b[],
int  off,
int  len 
) throws IOException [private]

int seda.nbio.NonblockingSocketInputStream.read ( byte  b[],
int  off,
int  len 
) throws IOException [virtual]

Perform a non-blocking read of up to len bytes from the underlying stream into the byte array b starting at offset off.

Returns:
The total number of bytes read into the buffer, 0 if no data was available, or -1 if the end of the stream has been reached.

Implements seda.nbio.NonblockingInputStream.

int seda.nbio.NonblockingSocketInputStream.read ( byte  b[]  )  throws IOException [virtual]

Perform a non-blocking read of up to b.length bytes from the underlying stream.

Returns:
The total number of bytes read into the buffer, 0 if no data was available, or -1 if the end of the stream has been reached.

Implements seda.nbio.NonblockingInputStream.

int seda.nbio.NonblockingSocketInputStream.read (  )  throws IOException [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.

Implements seda.nbio.NonblockingInputStream.

long seda.nbio.NonblockingSocketInputStream.skip ( long  n  )  throws IOException [virtual]

Skip n bytes of input.

This is a blocking operation.

Implements seda.nbio.NonblockingInputStream.


Member Data Documentation

boolean seda.nbio.NonblockingSocketInputStream.eof [private]

NBIOFileDescriptor seda.nbio.NonblockingSocketInputStream.fd [private]

NonblockingSocketImpl seda.nbio.NonblockingSocketInputStream.impl [private]

final int seda.nbio.NonblockingSocketInputStream.SKIPBUFLEN = 4096 [static, private]

byte seda.nbio.NonblockingSocketInputStream.temp[] = new byte[1] [private]


The documentation for this class was generated from the following file:
Generated on Mon Oct 30 12:28:00 2006 for libnbio2-java by  doxygen 1.4.7