Package elki.data

Class LabelList.Serializer

    • Constructor Summary

      Constructors 
      Constructor Description
      Serializer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LabelList fromByteBuffer​(java.nio.ByteBuffer buffer)
      Deserialize an object from a byte buffer (e.g., disk)
      int getByteSize​(LabelList object)
      Get the size of the object in bytes.
      void toByteBuffer​(java.nio.ByteBuffer buffer, LabelList object)
      Serialize the object to a byte array (e.g., disk)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Serializer

        public Serializer()
    • Method Detail

      • fromByteBuffer

        public LabelList fromByteBuffer​(java.nio.ByteBuffer buffer)
                                 throws java.io.IOException
        Description copied from interface: ByteBufferSerializer
        Deserialize an object from a byte buffer (e.g., disk)
        Specified by:
        fromByteBuffer in interface ByteBufferSerializer<LabelList>
        Parameters:
        buffer - Data array to process
        Returns:
        Deserialized object
        Throws:
        java.io.IOException - on IO errors
      • toByteBuffer

        public void toByteBuffer​(java.nio.ByteBuffer buffer,
                                 LabelList object)
                          throws java.io.IOException
        Description copied from interface: ByteBufferSerializer
        Serialize the object to a byte array (e.g., disk)
        Specified by:
        toByteBuffer in interface ByteBufferSerializer<LabelList>
        Parameters:
        buffer - Buffer to serialize to
        object - Object to serialize
        Throws:
        java.io.IOException - on IO errors
      • getByteSize

        public int getByteSize​(LabelList object)
                        throws java.io.IOException
        Description copied from interface: ByteBufferSerializer
        Get the size of the object in bytes.
        Specified by:
        getByteSize in interface ByteBufferSerializer<LabelList>
        Parameters:
        object - Object to serialize
        Returns:
        maximum size in serialized form
        Throws:
        java.io.IOException - on IO errors