Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

BinaryWriteBuffer Class Reference

#include <coherence/util/BinaryWriteBuffer.hpp>

Inherits OctetArrayWriteBuffer.

List of all members.


Detailed Description

A WriteBuffer implementation whose primary purpose is to be used to create Binary objects.

Author:
phf 2011.03.11
Since:
Coherence 3.7.1

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:


 return getUnsafeReadBuffer()->toBinary();
 

Returns:
the contents of this WriteBuffer as a Binary object
Since:
Coherence 3.7.1


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.

Constructor & Destructor Documentation

BinaryWriteBuffer ( size32_t  cbCap  )  [protected]

Construct a BinaryWriteBuffer with a certain initial capacity.

Parameters:
cbCap initial capacity

BinaryWriteBuffer ( size32_t  cbCap,
size32_t  cbMax 
) [protected]

Construct a BinaryWriteBuffer with a certain initial capacity and a certain maximum capacity.

Parameters:
cbCap initial capacity
cbMax maximum capacity
Exceptions:
IllegalArgumentException if cbCap is greater than cbMax


Member Function Documentation

virtual Array<octet_t>::View getInternalOctetArray (  )  const [protected, virtual]

Obtain the internal octet array that this WriteBuffer uses.

Intended for use only by Binary.

Returns:
the actual octet array that this WriteBuffer uses

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.

Parameters:
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.


The documentation for this class was generated from the following file:
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.