Class FixedSizeObjectSerializer<T>

    • Constructor Detail

      • FixedSizeObjectSerializer

        public FixedSizeObjectSerializer​(byte fieldType,
                                         int serializedDataSize,
                                         String dataClassName)
        Construct the FixedSizeSerializer.
        Parameters:
        fieldType - byte; the field type (returned by the fieldType method)
        serializedDataSize - int; number of bytes required for serialized T
        dataClassName - String; returned by the dataClassName method
    • Method Detail

      • size

        public final int size​(Object object)
        Description copied from interface: Serializer
        Compute the number of bytes needed to serialize an object of type T (excluding the byte(s) that indicate that an object of type T is next in the data stream).
        Parameters:
        object - T; Instance of the object
        Returns:
        int; the number of bytes needed to serialize an object of type T