#include <coherence/util/BinaryWriteBuffer.hpp>
Inherits OctetArrayWriteBuffer.
Public Types | |
typedef spec::Handle | Handle |
BinaryWriteBuffer Handle definition. | |
typedef spec::View | View |
BinaryWriteBuffer View definition. | |
typedef spec::Holder | Holder |
BinaryWriteBuffer Holder definition. | |
typedef TypedHandle < const Binary > | BinaryView |
Binary View definition. | |
Public Member Functions | |
virtual BinaryView | toBinary () const |
Returns a new Binary object that holds the complete contents of this WriteBuffer. This method is functionally equivalent to the following code:
| |
Protected Member Functions | |
BinaryWriteBuffer (size32_t cbCap) | |
Construct a BinaryWriteBuffer with a certain initial capacity. | |
BinaryWriteBuffer (size32_t cbCap, size32_t cbMax) | |
Construct a BinaryWriteBuffer with a certain initial capacity and a certain maximum capacity. | |
virtual Array < octet_t >::View | getInternalOctetArray () const |
Obtain the internal octet array that this WriteBuffer uses. | |
virtual void | checkBounds (size32_t of, size32_t cb) |
Validate the ranges for the passed bounds and make sure that the underlying array is big enough to handle them. |
BinaryWriteBuffer | ( | size32_t | cbCap | ) | [protected] |
BinaryWriteBuffer | ( | size32_t | cbCap, | |
size32_t | cbMax | |||
) | [protected] |
Construct a BinaryWriteBuffer with a certain initial capacity and a certain maximum capacity.
cbCap | initial capacity | |
cbMax | maximum capacity |
IllegalArgumentException | if cbCap is greater than cbMax |
Obtain the internal octet array that this WriteBuffer uses.
Intended for use only by Binary.
virtual void checkBounds | ( | size32_t | of, | |
size32_t | cb | |||
) | [protected, virtual] |
Validate the ranges for the passed bounds and make sure that the underlying array is big enough to handle them.
Note: This method prevents all modifications from occurring once the BinaryWriteBuffer has supplied its octet array to a Binary object.
of | the offset that data is about to be written to | |
cb | the length of the data that is about to be written |
Reimplemented from OctetArrayWriteBuffer.