Main Page | Packages | Class Hierarchy | Compound List | File List | Compound Members

nbio.NonblockingSocketInputStream Class Reference

Inherits 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

final int SKIPBUFLEN = 4096


Constructor & Destructor Documentation

nbio.NonblockingSocketInputStream.NonblockingSocketInputStream NonblockingSocketImpl  impl  )  [package]
 


Member Function Documentation

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

Implements nbio.NonblockingInputStream.

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

Implements nbio.NonblockingInputStream.

int 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 nbio.NonblockingInputStream.

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

int 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 nbio.NonblockingInputStream.

int 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 nbio.NonblockingInputStream.

int 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 nbio.NonblockingInputStream.

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

Skip n bytes of input.

This is a blocking operation.

Implements nbio.NonblockingInputStream.


Member Data Documentation

boolean nbio.NonblockingSocketInputStream.eof [private]
 

NBIOFileDescriptor nbio.NonblockingSocketInputStream.fd [private]
 

NonblockingSocketImpl nbio.NonblockingSocketInputStream.impl [private]
 

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

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


The documentation for this class was generated from the following file:
Generated on Fri Jul 18 21:37:52 2003 for libnbio2-java by doxygen 1.3.2