Class ArrayOfLongsSerDe

java.lang.Object
org.apache.datasketches.ArrayOfItemsSerDe<Long>
org.apache.datasketches.ArrayOfLongsSerDe

public class ArrayOfLongsSerDe
extends ArrayOfItemsSerDe<Long>
Methods of serializing and deserializing arrays of Long.
Author:
Alexander Saydakov
  • Constructor Details

  • Method Details

    • serializeToByteArray

      public byte[] serializeToByteArray​(Long[] items)
      Description copied from class: ArrayOfItemsSerDe
      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.
      Specified by:
      serializeToByteArray in class ArrayOfItemsSerDe<Long>
      Parameters:
      items - array of items to be serialized
      Returns:
      serialized representation of the given array of items
    • deserializeFromMemory

      public Long[] deserializeFromMemory​(org.apache.datasketches.memory.Memory mem, int length)
      Description copied from class: ArrayOfItemsSerDe
      Deserialize an array of items from a given Memory object. This method is called by the sketch deserialization process.
      Specified by:
      deserializeFromMemory in class ArrayOfItemsSerDe<Long>
      Parameters:
      mem - Memory containing a serialized array of items
      length - number of items in the serialized array
      Returns:
      deserialized array of items