Package elki.utilities.io
Class ByteArrayUtil.ShortSerializer
- java.lang.Object
-
- elki.utilities.io.ByteArrayUtil.ShortSerializer
-
- All Implemented Interfaces:
ByteBufferSerializer<java.lang.Short>
,FixedSizeByteBufferSerializer<java.lang.Short>
- Enclosing class:
- ByteArrayUtil
public static final class ByteArrayUtil.ShortSerializer extends java.lang.Object implements FixedSizeByteBufferSerializer<java.lang.Short>
Serializer for short objects.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ShortSerializer()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Short
fromByteBuffer(java.nio.ByteBuffer buffer)
Deprecated.int
getByteSize(java.lang.Short object)
Deprecated.int
getFixedByteSize()
Get the fixed size needed by this serializer.void
toByteBuffer(java.nio.ByteBuffer buffer, java.lang.Short obj)
Deprecated.
-
-
-
Method Detail
-
fromByteBuffer
@Deprecated public java.lang.Short fromByteBuffer(java.nio.ByteBuffer buffer)
Deprecated.Description copied from interface:ByteBufferSerializer
Deserialize an object from a byte buffer (e.g., disk)- Specified by:
fromByteBuffer
in interfaceByteBufferSerializer<java.lang.Short>
- Parameters:
buffer
- Data array to process- Returns:
- Deserialized object
-
toByteBuffer
@Deprecated public void toByteBuffer(java.nio.ByteBuffer buffer, java.lang.Short obj)
Deprecated.Description copied from interface:ByteBufferSerializer
Serialize the object to a byte array (e.g., disk)- Specified by:
toByteBuffer
in interfaceByteBufferSerializer<java.lang.Short>
- Parameters:
buffer
- Buffer to serialize toobj
- Object to serialize
-
getByteSize
@Deprecated public int getByteSize(java.lang.Short object)
Deprecated.Description copied from interface:ByteBufferSerializer
Get the size of the object in bytes.- Specified by:
getByteSize
in interfaceByteBufferSerializer<java.lang.Short>
- Parameters:
object
- Object to serialize- Returns:
- maximum size in serialized form
-
getFixedByteSize
public int getFixedByteSize()
Description copied from interface:FixedSizeByteBufferSerializer
Get the fixed size needed by this serializer.- Specified by:
getFixedByteSize
in interfaceFixedSizeByteBufferSerializer<java.lang.Short>
- Returns:
- Size
-
-