jcpp::Reader Class Reference

#include <Reader.h>

Inheritance diagram for jcpp::Reader:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void close ()=0
virtual void mark ()
virtual boolean markSupported ()
virtual int read ()=0
virtual int read (char *cbuf, int length)
virtual int read (char *cbuf, int off, int length)=0
virtual boolean ready ()=0
virtual void reset ()
virtual long skip (long length)=0

Protected Member Functions

void en (char *str)


Detailed Description

A knockoff of the Reader class in java.io, this is just an interface, StdReader takes a file descriptor and makes it a Reader.

Member Function Documentation

virtual void jcpp::Reader::close (  )  [pure virtual]

Close the underlying file descriptor.

Implemented in jcpp::BufferedReader, jcpp::NonblockingReader, and jcpp::StdReader.

virtual void jcpp::Reader::mark (  )  [inline, virtual]

Mark this point in the read stream.

Reimplemented in jcpp::BufferedReader, and jcpp::NonblockingReader.

00021                       {
00022     en((char *)"not allowed to use mark() in Reader");
00023   }

virtual boolean jcpp::Reader::markSupported (  )  [inline, virtual]

Determine if this stream supports marking the stream.

Reimplemented in jcpp::BufferedReader, and jcpp::NonblockingReader.

00025                                   {
00026     return FALSE;
00027   }

virtual int jcpp::Reader::read (  )  [pure virtual]

Read a single character off the stream.

Implemented in jcpp::BufferedReader, jcpp::NonblockingReader, and jcpp::StdReader.

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

Read length bytes into the buffer pointed to by cbuf.

Reimplemented in jcpp::BufferedReader, jcpp::NonblockingReader, and jcpp::StdReader.

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

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

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

Implemented in jcpp::BufferedReader, jcpp::NonblockingReader, and jcpp::StdReader.

virtual boolean jcpp::Reader::ready (  )  [pure virtual]

Answers TRUE if the stream is ready to be read.

Implemented in jcpp::BufferedReader, jcpp::NonblockingReader, and jcpp::StdReader.

virtual void jcpp::Reader::reset (  )  [inline, virtual]

Reset the stream back to the previously set mark, if supported, error otherwise.

Reimplemented in jcpp::BufferedReader, and jcpp::NonblockingReader.

00041                        {
00042     en((char *)":-( Reader::reset() not supported");
00043   }

virtual long jcpp::Reader::skip ( long  length  )  [pure virtual]

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

Implemented in jcpp::BufferedReader, jcpp::NonblockingReader, and jcpp::StdReader.


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