public final class IntegerArrayPacker extends java.lang.Object implements PrimitiveArrayPacker<int[]>
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
addToBuffer(java.nio.ByteBuffer byteBuffer,
int[] data,
int index)
Adds data[index] to the byteBuffer, position will be updated
|
java.nio.ByteBuffer |
addToBuffer(java.nio.ByteBuffer byteBuffer,
int offset,
int[] data,
int index)
Adds data[index] to the byteBuffer, position will not be updated
|
boolean |
bulkCopyToBuffer(int[] data,
java.nio.ByteBuffer buffer,
int offset,
int length) |
boolean |
bulkReadFromBuffer(java.nio.ByteBuffer buffer,
int[] dest,
int offset,
int length) |
static IntegerArrayPacker |
getInstance() |
MessageType<int[],int[]> |
getMessageType() |
void |
readFromBufferAndSet(java.nio.ByteBuffer byteBuffer,
int[] array,
int index)
Read data from buffer and set to the array.
|
void |
readFromBufferAndSet(java.nio.ByteBuffer byteBuffer,
int offset,
int[] array,
int index)
Read data from buffer and set to the array.
|
int[] |
wrapperForLength(int length) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
determineLength, isHeaderRequired, packToByteArray, packToByteBuffer, packToByteBuffer, readDataFromBuffer, unpackFromBuffer, unpackFromBuffer, wrapperForByteLength, writeDataToBuffer
unpackFromByteArray
public static IntegerArrayPacker getInstance()
public boolean bulkCopyToBuffer(int[] data, java.nio.ByteBuffer buffer, int offset, int length)
bulkCopyToBuffer
in interface PrimitiveArrayPacker<int[]>
public boolean bulkReadFromBuffer(java.nio.ByteBuffer buffer, int[] dest, int offset, int length)
bulkReadFromBuffer
in interface PrimitiveArrayPacker<int[]>
public MessageType<int[],int[]> getMessageType()
getMessageType
in interface PrimitiveArrayPacker<int[]>
public java.nio.ByteBuffer addToBuffer(java.nio.ByteBuffer byteBuffer, int[] data, int index)
PrimitiveArrayPacker
addToBuffer
in interface PrimitiveArrayPacker<int[]>
public java.nio.ByteBuffer addToBuffer(java.nio.ByteBuffer byteBuffer, int offset, int[] data, int index)
PrimitiveArrayPacker
addToBuffer
in interface PrimitiveArrayPacker<int[]>
public void readFromBufferAndSet(java.nio.ByteBuffer byteBuffer, int offset, int[] array, int index)
PrimitiveArrayPacker
readFromBufferAndSet
in interface PrimitiveArrayPacker<int[]>
byteBuffer
- ByteBuffer
instanceoffset
- offset of byteBufferarray
- destination arrayindex
- index of array to updatepublic void readFromBufferAndSet(java.nio.ByteBuffer byteBuffer, int[] array, int index)
PrimitiveArrayPacker
readFromBufferAndSet
in interface PrimitiveArrayPacker<int[]>
byteBuffer
- ByteBuffer
instancearray
- destination arrayindex
- index of array to updatepublic int[] wrapperForLength(int length)
wrapperForLength
in interface PrimitiveArrayPacker<int[]>