Package elki.data
Class SimpleClassLabel.Serializer
- java.lang.Object
-
- elki.data.SimpleClassLabel.Serializer
-
- All Implemented Interfaces:
ByteBufferSerializer<SimpleClassLabel>
- Enclosing class:
- SimpleClassLabel
public static class SimpleClassLabel.Serializer extends java.lang.Object implements ByteBufferSerializer<SimpleClassLabel>
Serialization class.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description Serializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleClassLabelfromByteBuffer(java.nio.ByteBuffer buffer)Deserialize an object from a byte buffer (e.g., disk)intgetByteSize(SimpleClassLabel object)Get the size of the object in bytes.voidtoByteBuffer(java.nio.ByteBuffer buffer, SimpleClassLabel object)Serialize the object to a byte array (e.g., disk)
-
-
-
Method Detail
-
fromByteBuffer
public SimpleClassLabel fromByteBuffer(java.nio.ByteBuffer buffer) throws java.io.IOException
Description copied from interface:ByteBufferSerializerDeserialize an object from a byte buffer (e.g., disk)- Specified by:
fromByteBufferin interfaceByteBufferSerializer<SimpleClassLabel>- Parameters:
buffer- Data array to process- Returns:
- Deserialized object
- Throws:
java.io.IOException- on IO errors
-
toByteBuffer
public void toByteBuffer(java.nio.ByteBuffer buffer, SimpleClassLabel object) throws java.io.IOExceptionDescription copied from interface:ByteBufferSerializerSerialize the object to a byte array (e.g., disk)- Specified by:
toByteBufferin interfaceByteBufferSerializer<SimpleClassLabel>- Parameters:
buffer- Buffer to serialize toobject- Object to serialize- Throws:
java.io.IOException- on IO errors
-
getByteSize
public int getByteSize(SimpleClassLabel object) throws java.io.IOException
Description copied from interface:ByteBufferSerializerGet the size of the object in bytes.- Specified by:
getByteSizein interfaceByteBufferSerializer<SimpleClassLabel>- Parameters:
object- Object to serialize- Returns:
- maximum size in serialized form
- Throws:
java.io.IOException- on IO errors
-
-