CCAFFEINE
0.8.8
|
#include <Reader.h>
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) |
A knockoff of the Reader class in java.io, this is just an interface, StdReader takes a file descriptor and makes it a Reader.
virtual void jcpp::Reader::close | ( | ) | [pure virtual] |
Close the underlying file descriptor.
Implemented in jcpp::NonblockingReader, jcpp::BufferedReader, and jcpp::StdReader.
virtual void jcpp::Reader::mark | ( | ) | [inline, virtual] |
Mark this point in the read stream.
Reimplemented in jcpp::NonblockingReader, and jcpp::BufferedReader.
{ en((char *)"not allowed to use mark() in Reader"); }
virtual boolean jcpp::Reader::markSupported | ( | ) | [inline, virtual] |
Determine if this stream supports marking the stream.
Reimplemented in jcpp::NonblockingReader, and jcpp::BufferedReader.
{
return FALSE;
}
virtual int jcpp::Reader::read | ( | ) | [pure virtual] |
Read a single character off the stream.
Implemented in jcpp::NonblockingReader, jcpp::BufferedReader, 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::NonblockingReader, jcpp::BufferedReader, and jcpp::StdReader.
{ return read(cbuf, 0 , length); }
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::NonblockingReader, jcpp::BufferedReader, and jcpp::StdReader.
virtual boolean jcpp::Reader::ready | ( | ) | [pure virtual] |
Answers TRUE if the stream is ready to be read.
Implemented in jcpp::NonblockingReader, jcpp::BufferedReader, 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::NonblockingReader, and jcpp::BufferedReader.
{ en((char *)":-( Reader::reset() not supported"); }
virtual long jcpp::Reader::skip | ( | long | length | ) | [pure virtual] |
Skip length bytes or to end-of-file whichever comes first.
Implemented in jcpp::NonblockingReader, jcpp::BufferedReader, and jcpp::StdReader.