Package org.apache.datasketches
Class ArrayOfLongsSerDe
public class ArrayOfLongsSerDe extends ArrayOfItemsSerDe<Long>
Methods of serializing and deserializing arrays of Long.
- Author:
- Alexander Saydakov
-
Constructor Summary
Constructors Constructor Description ArrayOfLongsSerDe() -
Method Summary
Modifier and Type Method Description Long[]deserializeFromMemory(org.apache.datasketches.memory.Memory mem, int length)Deserialize an array of items from a given Memory object.byte[]serializeToByteArray(Long[] items)Serialize an array of items to byte array.
-
Constructor Details
-
ArrayOfLongsSerDe
public ArrayOfLongsSerDe()
-
-
Method Details
-
serializeToByteArray
Description copied from class:ArrayOfItemsSerDeSerialize 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:
serializeToByteArrayin classArrayOfItemsSerDe<Long>- Parameters:
items- array of items to be serialized- Returns:
- serialized representation of the given array of items
-
deserializeFromMemory
Description copied from class:ArrayOfItemsSerDeDeserialize an array of items from a given Memory object. This method is called by the sketch deserialization process.- Specified by:
deserializeFromMemoryin classArrayOfItemsSerDe<Long>- Parameters:
mem- Memory containing a serialized array of itemslength- number of items in the serialized array- Returns:
- deserialized array of items
-