public static class ByteArrayUtil.FloatSerializer extends Object implements FixedSizeByteBufferSerializer<Float>
Modifier | Constructor and Description |
---|---|
protected |
ByteArrayUtil.FloatSerializer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Float |
fromByteBuffer(ByteBuffer buffer)
Deserialize an object from a byte buffer (e.g. disk)
|
int |
getByteSize(Float object)
Get the size of the object in bytes.
|
int |
getFixedByteSize()
Get the fixed size needed by this serializer.
|
void |
toByteBuffer(ByteBuffer buffer,
Float obj)
Serialize the object to a byte array (e.g. disk)
|
protected ByteArrayUtil.FloatSerializer()
public Float fromByteBuffer(ByteBuffer buffer)
ByteBufferSerializer
fromByteBuffer
in interface ByteBufferSerializer<Float>
buffer
- Data array to processpublic void toByteBuffer(ByteBuffer buffer, Float obj)
ByteBufferSerializer
toByteBuffer
in interface ByteBufferSerializer<Float>
buffer
- Buffer to serialize toobj
- Object to serializepublic int getByteSize(Float object)
ByteBufferSerializer
getByteSize
in interface ByteBufferSerializer<Float>
object
- Object to serializepublic int getFixedByteSize()
FixedSizeByteBufferSerializer
getFixedByteSize
in interface FixedSizeByteBufferSerializer<Float>