public final class ShortArrayPacker extends java.lang.Object implements PrimitiveArrayPacker<short[]>
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
addToBuffer(java.nio.ByteBuffer byteBuffer,
int offset,
short[] data,
int index)
Adds data[index] to the byteBuffer, position will not be updated
|
java.nio.ByteBuffer |
addToBuffer(java.nio.ByteBuffer byteBuffer,
short[] data,
int index)
Adds data[index] to the byteBuffer, position will be updated
|
boolean |
bulkCopyToBuffer(short[] src,
java.nio.ByteBuffer buffer,
int offset,
int length) |
boolean |
bulkReadFromBuffer(java.nio.ByteBuffer buffer,
short[] dest,
int offset,
int length) |
static ShortArrayPacker |
getInstance() |
MessageType<short[],short[]> |
getMessageType() |
void |
readFromBufferAndSet(java.nio.ByteBuffer byteBuffer,
int offset,
short[] array,
int index)
Read data from buffer and set to the array.
|
void |
readFromBufferAndSet(java.nio.ByteBuffer byteBuffer,
short[] array,
int index)
Read data from buffer and set to the array.
|
short[] |
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 ShortArrayPacker getInstance()
public boolean bulkReadFromBuffer(java.nio.ByteBuffer buffer, short[] dest, int offset, int length)
bulkReadFromBuffer
in interface PrimitiveArrayPacker<short[]>
public boolean bulkCopyToBuffer(short[] src, java.nio.ByteBuffer buffer, int offset, int length)
bulkCopyToBuffer
in interface PrimitiveArrayPacker<short[]>
public MessageType<short[],short[]> getMessageType()
getMessageType
in interface PrimitiveArrayPacker<short[]>
public java.nio.ByteBuffer addToBuffer(java.nio.ByteBuffer byteBuffer, short[] data, int index)
PrimitiveArrayPacker
addToBuffer
in interface PrimitiveArrayPacker<short[]>
public java.nio.ByteBuffer addToBuffer(java.nio.ByteBuffer byteBuffer, int offset, short[] data, int index)
PrimitiveArrayPacker
addToBuffer
in interface PrimitiveArrayPacker<short[]>
public void readFromBufferAndSet(java.nio.ByteBuffer byteBuffer, int offset, short[] array, int index)
PrimitiveArrayPacker
readFromBufferAndSet
in interface PrimitiveArrayPacker<short[]>
byteBuffer
- ByteBuffer
instanceoffset
- offset of byteBufferarray
- destination arrayindex
- index of array to updatepublic void readFromBufferAndSet(java.nio.ByteBuffer byteBuffer, short[] array, int index)
PrimitiveArrayPacker
readFromBufferAndSet
in interface PrimitiveArrayPacker<short[]>
byteBuffer
- ByteBuffer
instancearray
- destination arrayindex
- index of array to updatepublic short[] wrapperForLength(int length)
wrapperForLength
in interface PrimitiveArrayPacker<short[]>