Class VariableCodec<T>

    • Constructor Detail

      • VariableCodec

        public VariableCodec()
    • Method Detail

      • getFixedSize

        public int getFixedSize()
        Specified by:
        getFixedSize in interface Codec<T>
        Returns:
        -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
      • deepCopy

        public T deepCopy​(T source)
        Specified by:
        deepCopy in interface Codec<T>
        Returns:
        a deep copy of the source object. If the source is immutable the same source should be returned.
      • estimatedSize

        public int estimatedSize​(T object)
        Specified by:
        estimatedSize in interface Codec<T>
        Returns:
        the estimated marshaled size of the object.