18 #ifndef _DECAF_INTERNAL_NIO_BYTEBUFFER_H_ 19 #define _DECAF_INTERNAL_NIO_BYTEBUFFER_H_ 153 ByteArrayBuffer(
unsigned char* array,
int size,
int offset,
int length,
154 bool readOnly =
false );
174 int offset,
int length,
bool readOnly =
false );
194 return this->readOnly;
200 virtual unsigned char* array();
205 virtual int arrayOffset()
const;
262 virtual unsigned char get()
const;
267 virtual unsigned char get(
int index )
const;
273 return (
char)this->
get();
281 return (
char)this->
get( index );
287 virtual double getDouble();
292 virtual double getDouble(
int index )
const;
297 virtual float getFloat();
302 virtual float getFloat(
int index )
const;
307 virtual long long getLong();
312 virtual long long getLong(
int index )
const;
317 virtual int getInt();
322 virtual int getInt(
int index )
const;
327 virtual short getShort();
332 virtual short getShort(
int index )
const;
418 this->readOnly = value;
This class defines six categories of operations upon byte buffers:
Definition: ByteBuffer.h:97
virtual decaf::nio::CharBuffer * asCharBuffer() const
Creates a view of this byte buffer as a char buffer.The content of the new buffer will start at this ...
Definition: ByteArrayBuffer.h:217
#define NULL
Definition: Config.h:33
This class defines four categories of operations upon float buffers:
Definition: FloatBuffer.h:50
This class defines four categories of operations upon short buffers:
Definition: ShortBuffer.h:50
virtual decaf::nio::FloatBuffer * asFloatBuffer() const
Creates a view of this byte buffer as a float buffer.The content of the new buffer will start at this...
Definition: ByteArrayBuffer.h:227
virtual decaf::nio::DoubleBuffer * asDoubleBuffer() const
Creates a view of this byte buffer as a double buffer.The content of the new buffer will start at thi...
Definition: ByteArrayBuffer.h:222
virtual char getChar()
Reads the next byte at this buffer's current position, and then increments the position by one...
Definition: ByteArrayBuffer.h:272
This class defines four categories of operations upon character buffers:
Definition: CharBuffer.h:65
This class defines four categories of operations upon long long buffers:
Definition: LongBuffer.h:50
virtual decaf::nio::ShortBuffer * asShortBuffer() const
Creates a view of this byte buffer as a short buffer.The content of the new buffer will start at this...
Definition: ByteArrayBuffer.h:242
This class adapts primitive type arrays to a base byte array so that the classes can inter-operate on...
Definition: ByteArrayAdapter.h:43
This class defines four categories of operations upon double buffers:
Definition: DoubleBuffer.h:52
This class defines six categories of operations upon byte buffers:
Definition: ByteArrayBuffer.h:104
virtual char getChar(int index) const
Reads one byte at the given index and returns it.The index in the Buffer where the byte is to be read...
Definition: ByteArrayBuffer.h:279
#define DECAF_API
Definition: Config.h:29
virtual bool hasArray() const
Tells whether or not this buffer is backed by an accessible byte array.If this method returns true th...
Definition: ByteArrayBuffer.h:210
virtual void setReadOnly(bool value)
Sets this ByteArrayBuffer as Read-Only or not Read-Only.
Definition: ByteArrayBuffer.h:417
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
virtual decaf::nio::LongBuffer * asLongBuffer() const
Creates a view of this byte buffer as a long buffer.The content of the new buffer will start at this ...
Definition: ByteArrayBuffer.h:237
virtual decaf::nio::IntBuffer * asIntBuffer() const
Creates a view of this byte buffer as a int buffer.The content of the new buffer will start at this b...
Definition: ByteArrayBuffer.h:232
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25
This class defines four categories of operations upon int buffers:
Definition: IntBuffer.h:50
virtual bool isReadOnly() const
Tells whether or not this buffer is read-only.true if, and only if, this buffer is read-only ...
Definition: ByteArrayBuffer.h:193