#include <coherence/io/AbstractReadBuffer.hpp>
Inherits Object, and ReadBuffer.
Inherited by AbstractOctetArrayReadBuffer.
Public Types | ||||||||||
typedef spec::Handle | Handle | |||||||||
AbstractReadBuffer Handle definition. | ||||||||||
typedef spec::View | View | |||||||||
AbstractReadBuffer View definition. | ||||||||||
typedef spec::Holder | Holder | |||||||||
AbstractReadBuffer Holder definition. | ||||||||||
typedef this_spec::Handle | Handle | |||||||||
ReadBuffer Handle definition. | ||||||||||
typedef this_spec::View | View | |||||||||
ReadBuffer View definition. | ||||||||||
typedef this_spec::Holder | Holder | |||||||||
ReadBuffer Holder definition. | ||||||||||
typedef TypedHandle < const coherence::util::Binary > | BinaryView | |||||||||
Binary View definition. | ||||||||||
typedef TypedHandle < coherence::util::Binary > | BinaryHandle | |||||||||
Binary Handle definition. | ||||||||||
Public Member Functions | ||||||||||
virtual BufferInput::Handle | getBufferInput () const | |||||||||
Get a BufferInput object to read data from this buffer. Note that each call to this method will return a new BufferInput object, with the possible exception being that a zero-length ReadBuffer could always return the same instance (since there is nothing to read).
| ||||||||||
virtual ReadBuffer::View | getReadBuffer (size32_t of, size32_t cb) const | |||||||||
Obtain a ReadBuffer for a portion of this ReadBuffer.
| ||||||||||
virtual BinaryView | toBinary () const | |||||||||
Returns a new Binary object that holds the complete contents of this ReadBuffer. This is the equivalent of
| ||||||||||
virtual BinaryView | toBinary (size32_t of, size32_t cb) const | |||||||||
Returns a Binary object that holds the specified portion of this ReadBuffer. This is the equivalent of
| ||||||||||
virtual Array < octet_t >::View | toOctetArray () const | |||||||||
Get the contents of the ReadBuffer as an octet array. This is the equivalent of
| ||||||||||
virtual Array < octet_t >::View | toOctetArray (size32_t of, size32_t cb) const | |||||||||
Get a portion of the contents of the ReadBuffer as an octet array.
| ||||||||||
virtual bool | equals (Object::View v) const | |||||||||
Static Public Member Functions | ||||||||||
static Array < octet_t >::Handle | getEmptyOctetArray () | |||||||||
An empty octet array (by definition immutable). | ||||||||||
static BinaryHandle | getEmptyBinary () | |||||||||
An empty Binary object. | ||||||||||
static ReadBuffer::Handle | getEmptyReadBuffer () | |||||||||
A zero-length ReadBuffer (by definition immutable). | ||||||||||
Protected Member Functions | ||||||||||
virtual ReadBuffer::View | instantiateReadBuffer (size32_t of, size32_t cb) const =0 | |||||||||
Factory method: Instantiate a ReadBuffer for a portion of this ReadBuffer. | ||||||||||
virtual BufferInput::Handle | instantiateBufferInput () const | |||||||||
Factory method: Instantiate a BufferInput object to read data from the ReadBuffer. | ||||||||||
virtual void | checkBounds (size32_t of, size32_t cb) const | |||||||||
Check if the specified read is within bounds. | ||||||||||
Classes | ||||||||||
class | AbstractBufferInput | |||||||||
This is an implementation of the BufferInput interface that delegates its work back to its ReadBuffer. More... |
virtual ReadBuffer::View instantiateReadBuffer | ( | size32_t | of, | |
size32_t | cb | |||
) | const [protected, pure virtual] |
Factory method: Instantiate a ReadBuffer for a portion of this ReadBuffer.
of | the beginning index, inclusive | |
cb | the number of bytes to include in the resulting ReadBuffer |
Implemented in OctetArrayReadBuffer, and Binary.
virtual BufferInput::Handle instantiateBufferInput | ( | ) | const [protected, virtual] |
Factory method: Instantiate a BufferInput object to read data from the ReadBuffer.
Reimplemented in AbstractOctetArrayReadBuffer.
virtual void checkBounds | ( | size32_t | of, | |
size32_t | cb | |||
) | const [protected, virtual] |
Check if the specified read is within bounds.
of | the absolute offset of the read operation | |
cb | the length in bytes of the read operation |
IndexOutOfBoundsException | if the specified read is not within bounds |
static BinaryHandle getEmptyBinary | ( | ) | [static] |
An empty Binary object.