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