activemq-cpp-3.6.0
|
Factory class used by static methods in the decaf::nio package to create the various default version of the NIO interfaces. More...
#include <src/main/decaf/internal/nio/BufferFactory.h>
Public Member Functions | |
virtual | ~BufferFactory () |
Static Public Member Functions | |
static decaf::nio::ByteBuffer * | createByteBuffer (int capacity) |
Allocates a new byte buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::ByteBuffer * | createByteBuffer (unsigned char *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new ByteBuffer. | |
static decaf::nio::ByteBuffer * | createByteBuffer (std::vector< unsigned char > &buffer) |
Wraps the passed STL Byte Vector in a ByteBuffer. | |
static decaf::nio::CharBuffer * | createCharBuffer (int capacity) |
Allocates a new char buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::CharBuffer * | createCharBuffer (char *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new CharBuffer. | |
static decaf::nio::CharBuffer * | createCharBuffer (std::vector< char > &buffer) |
Wraps the passed STL Byte Vector in a CharBuffer. | |
static decaf::nio::DoubleBuffer * | createDoubleBuffer (int capacity) |
Allocates a new double buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::DoubleBuffer * | createDoubleBuffer (double *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new DoubleBuffer. | |
static decaf::nio::DoubleBuffer * | createDoubleBuffer (std::vector< double > &buffer) |
Wraps the passed STL Double Vector in a DoubleBuffer. | |
static decaf::nio::FloatBuffer * | createFloatBuffer (int capacity) |
Allocates a new float buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::FloatBuffer * | createFloatBuffer (float *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new FloatBuffer. | |
static decaf::nio::FloatBuffer * | createFloatBuffer (std::vector< float > &buffer) |
Wraps the passed STL Float Vector in a FloatBuffer. | |
static decaf::nio::LongBuffer * | createLongBuffer (int capacity) |
Allocates a new long long buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::LongBuffer * | createLongBuffer (long long *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new LongBuffer. | |
static decaf::nio::LongBuffer * | createLongBuffer (std::vector< long long > &buffer) |
Wraps the passed STL Long Vector in a LongBuffer. | |
static decaf::nio::IntBuffer * | createIntBuffer (int capacity) |
Allocates a new int buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::IntBuffer * | createIntBuffer (int *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new IntBuffer. | |
static decaf::nio::IntBuffer * | createIntBuffer (std::vector< int > &buffer) |
Wraps the passed STL int Vector in a IntBuffer. | |
static decaf::nio::ShortBuffer * | createShortBuffer (int capacity) |
Allocates a new short buffer whose position will be zero its limit will be its capacity and its mark is not set. | |
static decaf::nio::ShortBuffer * | createShortBuffer (short *buffer, int size, int offset, int length) |
Wraps the passed buffer with a new ShortBuffer. | |
static decaf::nio::ShortBuffer * | createShortBuffer (std::vector< short > &buffer) |
Wraps the passed STL Short Vector in a ShortBuffer. |
Factory class used by static methods in the decaf::nio package to create the various default version of the NIO interfaces.
|
inlinevirtual |
|
static |
Allocates a new byte buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | The internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new ByteBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL Byte Vector in a ByteBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |
|
static |
Allocates a new char buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | The internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new CharBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL Byte Vector in a CharBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |
|
static |
Allocates a new double buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | The internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new DoubleBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL Double Vector in a DoubleBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |
|
static |
Allocates a new float buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | The internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new FloatBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL Float Vector in a FloatBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |
|
static |
Allocates a new int buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | The internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new IntBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL int Vector in a IntBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |
|
static |
Allocates a new long long buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | - the internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new LongBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL Long Vector in a LongBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |
|
static |
Allocates a new short buffer whose position will be zero its limit will be its capacity and its mark is not set.
capacity | The internal buffer's capacity. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed buffer with a new ShortBuffer.
The new buffer will be backed by the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity will be array.length, its position will be offset, its limit will be offset + length, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The array that will back the new buffer. |
size | The size of the specified buffer. |
offset | The offset of the subarray to be used. |
length | The length of the subarray to be used. |
NullPointerException | if the buffer given in Null. |
IndexOutOfBoundsException | if the capacity specified is negative. |
|
static |
Wraps the passed STL Short Vector in a ShortBuffer.
The new buffer will be backed by the given byte array; modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be buffer.size(), its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.
buffer | The vector that will back the new buffer, the vector must have been sized to the desired size already by calling vector.resize( N ). |