public final class ByteArrayDataType extends BasicDataType<byte[]>
Modifier and Type | Field and Description |
---|---|
static ByteArrayDataType |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
byte[][] |
createStorage(int size)
Create storage object of array type to hold values
|
int |
getMemory(byte[] data)
Calculates the amount of used memory in bytes.
|
byte[] |
read(java.nio.ByteBuffer buff)
Read an object.
|
void |
write(WriteBuffer buff,
byte[] data)
Write an object.
|
binarySearch, cast, compare, equals, hashCode, isMemoryEstimationAllowed, read, write
public static final ByteArrayDataType INSTANCE
public int getMemory(byte[] data)
DataType
getMemory
in interface DataType<byte[]>
getMemory
in class BasicDataType<byte[]>
data
- the objectpublic void write(WriteBuffer buff, byte[] data)
DataType
write
in interface DataType<byte[]>
write
in class BasicDataType<byte[]>
buff
- the target bufferdata
- the valuepublic byte[] read(java.nio.ByteBuffer buff)
DataType
read
in interface DataType<byte[]>
read
in class BasicDataType<byte[]>
buff
- the source bufferpublic byte[][] createStorage(int size)
DataType
size
- number of values to hold