18#ifndef _DECAF_INTERNAL_NIO_SHORTARRAYBUFFER_H_
19#define _DECAF_INTERNAL_NIO_SHORTARRAYBUFFER_H_
86 ShortArrayBuffer(
short* array,
int size,
int offset,
int length,
bool readOnly =
false );
106 bool readOnly =
false );
155 virtual short get(
int index )
const;
166 return this->readOnly;
172 virtual ShortBuffer&
put(
short value );
177 virtual ShortBuffer&
put(
int index,
short value );
193 this->readOnly = value;
Definition: ShortArrayBuffer.h:37
virtual ShortBuffer & put(short value)
Writes the given shorts into this buffer at the current position, and then increments the position....
virtual short get()
Relative get method.Reads the value at this buffer's current position, and then increments the positi...
virtual ShortBuffer * duplicate()
Creates a new short buffer that shares this buffer's content.The content of the new buffer will be th...
virtual bool isReadOnly() const
Tells whether or not this buffer is read-only.true if, and only if, this buffer is read-only.
Definition: ShortArrayBuffer.h:165
virtual ShortBuffer & put(int index, short value)
Writes the given shorts into this buffer at the given index.The position in the Buffer to write the d...
virtual ShortBuffer & compact()
Compacts this buffer.The bytes between the buffer's current position and its limit,...
ShortArrayBuffer(int size, bool readOnly=false)
Creates a ShortArrayBuffer object that has its backing array allocated internally and is then owned a...
virtual void setReadOnly(bool value)
Sets this ShortArrayBuffer as Read-Only.
Definition: ShortArrayBuffer.h:192
virtual ShortBuffer * slice() const
Creates a new ShortBuffer whose content is a shared subsequence of this buffer's content....
virtual short get(int index) const
Absolute get method.Reads the value at the given index.The index in the Buffer where the short is to ...
virtual ShortBuffer * asReadOnlyBuffer() const
Creates a new, read-only short buffer that shares this buffer's content.The content of the new buffer...
virtual int arrayOffset()
Returns the offset within this buffer's backing array of the first element of the buffer (optional op...
ShortArrayBuffer(const ShortArrayBuffer &other)
Create a ShortArrayBuffer that mirrors this one, meaning it shares a reference to this buffers ByteAr...
virtual short * array()
Returns the short array that backs this buffer (optional operation).Modifications to this buffer's co...
ShortArrayBuffer(const decaf::lang::Pointer< ByteArrayAdapter > &array, int offset, int length, bool readOnly=false)
Creates a byte buffer that wraps the passed ByteArrayAdapter and start at the given offset.
ShortArrayBuffer(short *array, int size, int offset, int length, bool readOnly=false)
Creates a ShortArrayBuffer object that wraps the given array.
virtual ~ShortArrayBuffer()
virtual bool hasArray() const
Tells whether or not this buffer is backed by an accessible short array.If this method returns true t...
Definition: ShortArrayBuffer.h:160
This class adapts primitive type arrays to a base byte array so that the classes can inter-operate on...
Definition: ByteArrayAdapter.h:43
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
This class defines four categories of operations upon short buffers:
Definition: ShortBuffer.h:51
#define DECAF_API
Definition: Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition: AprPool.h:25