public class MessageBufferBE extends MessageBuffer
MessageBuffer implementation tailored to big-endian machines.
The specification of Message Pack demands writing short/int/float/long/double values in the big-endian format.
In the big-endian machine, we do not need to swap the byte order.address, base, reference, size| Modifier and Type | Method and Description |
|---|---|
double |
getDouble(int index) |
float |
getFloat(int index) |
int |
getInt(int index)
Read a big-endian int value at the specified index
|
long |
getLong(int index) |
short |
getShort(int index) |
void |
putDouble(int index,
double v) |
void |
putInt(int index,
int v)
Write a big-endian integer value to the memory
|
void |
putLong(int index,
long v) |
void |
putShort(int index,
short v) |
MessageBufferBE |
slice(int offset,
int length) |
allocate, array, arrayOffset, copyTo, getBoolean, getByte, getBytes, getBytes, hasArray, putBoolean, putByte, putByteBuffer, putBytes, putFloat, putMessageBuffer, releaseBuffer, size, sliceAsByteBuffer, sliceAsByteBuffer, toByteArray, toHexString, wrap, wrap, wrappublic MessageBufferBE slice(int offset, int length)
slice in class MessageBufferpublic short getShort(int index)
getShort in class MessageBufferpublic int getInt(int index)
MessageBuffergetInt in class MessageBufferpublic long getLong(int index)
getLong in class MessageBufferpublic float getFloat(int index)
getFloat in class MessageBufferpublic double getDouble(int index)
getDouble in class MessageBufferpublic void putShort(int index,
short v)
putShort in class MessageBufferpublic void putInt(int index,
int v)
MessageBufferputInt in class MessageBufferpublic void putLong(int index,
long v)
putLong in class MessageBufferpublic void putDouble(int index,
double v)
putDouble in class MessageBuffer