18 #ifndef _DECAF_NIO_BYTEBUFFER_H_ 19 #define _DECAF_NIO_BYTEBUFFER_H_ 120 virtual std::string toString()
const;
136 ByteBuffer&
get( std::vector<unsigned char> buffer );
167 ByteBuffer&
get(
unsigned char* buffer,
int size,
int offset,
int length );
218 ByteBuffer& put(
const unsigned char* buffer,
int size,
int offset,
int length );
232 ByteBuffer& put( std::vector<unsigned char>& buffer );
241 virtual bool isReadOnly()
const = 0;
259 virtual unsigned char* array() = 0;
279 virtual int arrayOffset()
const = 0;
290 virtual bool hasArray()
const = 0;
353 virtual IntBuffer* asIntBuffer()
const = 0;
404 virtual ByteBuffer* asReadOnlyBuffer()
const = 0;
450 virtual unsigned char get()
const = 0;
463 virtual unsigned char get(
int index )
const = 0;
474 virtual char getChar() = 0;
487 virtual char getChar(
int index )
const = 0;
498 virtual double getDouble() = 0;
511 virtual double getDouble(
int index )
const = 0;
522 virtual float getFloat() = 0;
535 virtual float getFloat(
int index )
const = 0;
546 virtual long long getLong() = 0;
559 virtual long long getLong(
int index )
const = 0;
570 virtual int getInt() = 0;
583 virtual int getInt(
int index )
const = 0;
594 virtual short getShort() = 0;
607 virtual short getShort(
int index )
const = 0;
621 virtual ByteBuffer& put(
unsigned char value ) = 0;
635 virtual ByteBuffer& put(
int index,
unsigned char value ) = 0;
650 virtual ByteBuffer& putChar(
char value ) = 0;
667 virtual ByteBuffer& putChar(
int index,
char value ) = 0;
682 virtual ByteBuffer& putDouble(
double value ) = 0;
699 virtual ByteBuffer& putDouble(
int index,
double value ) = 0;
714 virtual ByteBuffer& putFloat(
float value ) = 0;
731 virtual ByteBuffer& putFloat(
int index,
float value ) = 0;
746 virtual ByteBuffer& putLong(
long long value ) = 0;
763 virtual ByteBuffer& putLong(
int index,
long long value ) = 0;
795 virtual ByteBuffer& putInt(
int index,
int value ) = 0;
810 virtual ByteBuffer& putShort(
short value ) = 0;
827 virtual ByteBuffer& putShort(
int index,
short value ) = 0;
849 virtual int compareTo(
const ByteBuffer& value )
const;
854 virtual bool equals(
const ByteBuffer& value )
const;
864 virtual bool operator<(
const ByteBuffer& value )
const;
905 static ByteBuffer* wrap(
unsigned char* array,
int size,
int offset,
int length );
922 static ByteBuffer* wrap( std::vector<unsigned char>& buffer );
A container for data of a specific primitive type.
Definition: Buffer.h:125
This class defines six categories of operations upon byte buffers:
Definition: ByteBuffer.h:97
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
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
This class defines four categories of operations upon double buffers:
Definition: DoubleBuffer.h:52
#define DECAF_API
Definition: Config.h:29
bool operator==(const ArrayPointer< T > &left, const U *right)
Definition: ArrayPointer.h:379
virtual ~ByteBuffer()
Definition: ByteBuffer.h:115
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33
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