activemq-cpp-3.4.0

decaf::lang::Readable Class Reference

A Readable is a source of characters. More...

#include <src/main/decaf/lang/Readable.h>

Inheritance diagram for decaf::lang::Readable:

Public Member Functions

virtual ~Readable ()
virtual int read (decaf::nio::CharBuffer *charBuffer)=0
 Attempts to read characters into the specified character buffer.

Detailed Description

A Readable is a source of characters.

Characters from a Readable are made available to callers of the read method via a CharBuffer.

Since:
1.0

Constructor & Destructor Documentation

virtual decaf::lang::Readable::~Readable ( ) [inline, virtual]

Member Function Documentation

virtual int decaf::lang::Readable::read ( decaf::nio::CharBuffer charBuffer) [pure virtual]

Attempts to read characters into the specified character buffer.

The buffer is used as a repository of characters as-is: the only changes made are the results of a put operation. No flipping or rewinding of the buffer is performed.

Parameters:
charBufferThe Buffer to read Characters into.
Returns:
The number of char values added to the buffer, or -1 if this source of characters is at its end
Exceptions:
IOExceptionif an I/O error occurs.
NullPointerExceptionif buffer is NULL.
ReadOnlyBufferExceptionif charBuffer is a read only buffer.

Implemented in decaf::io::Reader.


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