Class ArrayOfItemsSerDe<T>

    • Constructor Detail

      • ArrayOfItemsSerDe

        public ArrayOfItemsSerDe()
    • Method Detail

      • serializeToByteArray

        public abstract byte[] serializeToByteArray​(T[] items)
        Serialize an array of items to byte array. The size of the array doesn't need to be serialized. This method is called by the sketch serialization process.
        Parameters:
        items - array of items to be serialized
        Returns:
        serialized representation of the given array of items
      • deserializeFromMemory

        public abstract T[] deserializeFromMemory​(org.apache.datasketches.memory.Memory mem,
                                                  int numItems)
        Deserialize an array of items from a given Memory object. This method is called by the sketch deserialization process.
        Parameters:
        mem - Memory containing a serialized array of items
        numItems - number of items in the serialized array
        Returns:
        deserialized array of items