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