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