18#ifndef _DECAF_INTERNAL_NIO_INTARRAYBUFFER_H_
19#define _DECAF_INTERNAL_NIO_INTARRAYBUFFER_H_
35 using decaf::internal::util::ByteArrayAdapter;
106 bool readOnly =
false );
155 virtual int get(
int index )
const;
166 return this->readOnly;
193 this->readOnly = value;
virtual int get(int index) const
Absolute get method.Reads the value at the given index.the int that is located at the given index.
virtual int * array()
Returns the int array that backs this buffer (optional operation).Modifications to this buffer's cont...
IntArrayBuffer(int size, bool readOnly=false)
Creates a IntArrayBuffer object that has its backing array allocated internally and is then owned and...
virtual ~IntArrayBuffer()
IntArrayBuffer(int *array, int size, int offset, int length, bool readOnly=false)
Creates a IntArrayBuffer object that wraps the given array.
virtual IntBuffer & put(int index, int value)
Writes the given ints into this buffer at the given index.a reference to this buffer.
virtual int get()
Relative get method.Reads the value at this buffer's current position, and then increments the positi...
virtual IntBuffer * duplicate()
Creates a new int buffer that shares this buffer's content.The content of the new buffer will be that...
virtual IntBuffer * asReadOnlyBuffer() const
Creates a new, read-only int buffer that shares this buffer's content.The content of the new buffer w...
virtual IntBuffer * slice() const
Creates a new IntBuffer whose content is a shared subsequence of this buffer's content....
IntArrayBuffer(const IntArrayBuffer &other)
Create a IntArrayBuffer that mirrors this one, meaning it shares a reference to this buffers ByteArra...
virtual int arrayOffset()
Returns the offset within this buffer's backing array of the first element of the buffer (optional op...
virtual void setReadOnly(bool value)
Sets this IntArrayBuffer as Read-Only.
Definition IntArrayBuffer.h:192
virtual IntBuffer & compact()
Compacts this buffer.The bytes between the buffer's current position and its limit,...
IntArrayBuffer(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.
virtual IntBuffer & put(int value)
Writes the given integer into this buffer at the current position, and then increments the position....
virtual bool hasArray() const
Tells whether or not this buffer is backed by an accessible int array.If this method returns true the...
Definition IntArrayBuffer.h:160
virtual bool isReadOnly() const
Tells whether or not this buffer is read-only.true if, and only if, this buffer is read-only.
Definition IntArrayBuffer.h:165
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 int buffers:
Definition IntBuffer.h:51
IntBuffer(int capacity)
Creates a IntBuffer object that has its backing array allocated internally and is then owned and dele...
#define DECAF_API
Definition Config.h:29
Definition BufferFactory.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25