jcpp::StdReader Class Reference

#include <StdReader.h>

Inheritance diagram for jcpp::StdReader:

Inheritance graph
[legend]
Collaboration diagram for jcpp::StdReader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 StdReader (int fd)
virtual void close ()
virtual int read ()
virtual int read (char *cbuf, int off, int length)
virtual int read (char *cbuf, int length)
virtual boolean ready ()
virtual long skip (long length)

Private Attributes

int numFDs
fd_set set
int fd
int debug


Detailed Description

Creates a Reader based on a file descriptor.

Constructor & Destructor Documentation

jcpp::StdReader::StdReader ( int  fd  ) 

Takes a file descriptor argument, fd.


Member Function Documentation

virtual void jcpp::StdReader::close (  )  [virtual]

Close the underlying file descriptor.

Implements jcpp::Reader.

virtual int jcpp::StdReader::read (  )  [virtual]

Read a single character off the stream.

Implements jcpp::Reader.

virtual int jcpp::StdReader::read ( char *  cbuf,
int  off,
int  length 
) [virtual]

Read <em length /em> bytes into the buffer pointed to by <em cbuf /em> beginning at the offset <em off /em>.

Implements jcpp::Reader.

virtual int jcpp::StdReader::read ( char *  cbuf,
int  length 
) [inline, virtual]

Read length bytes into the buffer pointed to by cbuf.

Reimplemented from jcpp::Reader.

00032                                            {
00033     return read(cbuf, 0 , length);
00034   }

virtual boolean jcpp::StdReader::ready (  )  [virtual]

Answers TRUE if the stream is ready to be read.

Implements jcpp::Reader.

virtual long jcpp::StdReader::skip ( long  length  )  [virtual]

Skip length bytes or to end-of-file whichever comes first.

Implements jcpp::Reader.


The documentation for this class was generated from the following file:

Generated on Thu Sep 17 08:21:29 2009 for CCAFFEINE by  doxygen 1.5.9