public class ArrayOfLongsSerDe extends ArrayOfItemsSerDe<Long>
Constructor and Description |
---|
ArrayOfLongsSerDe() |
Modifier and Type | Method and Description |
---|---|
Long[] |
deserializeFromMemory(org.apache.datasketches.memory.Memory mem,
int numItems)
Deserialize a contiguous sequence of serialized items from the given Memory
starting at a Memory offset of zero and extending numItems.
|
Long[] |
deserializeFromMemory(org.apache.datasketches.memory.Memory mem,
long offsetBytes,
int numItems)
Deserialize a contiguous sequence of serialized items from the given Memory
starting at the given Memory offsetBytes and extending numItems.
|
Class<Long> |
getClassOfT()
Returns the concrete class of type T
|
byte[] |
serializeToByteArray(Long item)
Serialize a single unserialized item to a byte array.
|
byte[] |
serializeToByteArray(Long[] items)
Serialize an array of unserialized items to a byte array of contiguous serialized items.
|
int |
sizeOf(Long item)
Returns the serialized size in bytes of a single unserialized item.
|
int |
sizeOf(Long[] items)
Returns the serialized size in bytes of the array of items.
|
int |
sizeOf(org.apache.datasketches.memory.Memory mem,
long offsetBytes,
int numItems)
Returns the serialized size in bytes of the number of contiguous serialized items in Memory.
|
String |
toString(Long item)
Returns a human readable string of an item.
|
public byte[] serializeToByteArray(Long item)
ArrayOfItemsSerDe
serializeToByteArray
in class ArrayOfItemsSerDe<Long>
item
- the item to be serializedpublic byte[] serializeToByteArray(Long[] items)
ArrayOfItemsSerDe
serializeToByteArray
in class ArrayOfItemsSerDe<Long>
items
- array of items to be serializedpublic Long[] deserializeFromMemory(org.apache.datasketches.memory.Memory mem, int numItems)
ArrayOfItemsSerDe
deserializeFromMemory
in class ArrayOfItemsSerDe<Long>
mem
- Memory containing a contiguous sequence of serialized itemsnumItems
- number of items in the contiguous serialized sequence.ArrayOfItemsSerDe.deserializeFromMemory(Memory, long, int)
public Long[] deserializeFromMemory(org.apache.datasketches.memory.Memory mem, long offsetBytes, int numItems)
ArrayOfItemsSerDe
deserializeFromMemory
in class ArrayOfItemsSerDe<Long>
mem
- Memory containing a contiguous sequence of serialized itemsoffsetBytes
- the starting offset in the given Memory.numItems
- number of items in the contiguous serialized sequence.public int sizeOf(Long item)
ArrayOfItemsSerDe
sizeOf
in class ArrayOfItemsSerDe<Long>
item
- a specific itempublic int sizeOf(Long[] items)
ArrayOfItemsSerDe
sizeOf
in class ArrayOfItemsSerDe<Long>
items
- an array of items.public int sizeOf(org.apache.datasketches.memory.Memory mem, long offsetBytes, int numItems)
ArrayOfItemsSerDe
sizeOf
in class ArrayOfItemsSerDe<Long>
mem
- the given Memory.offsetBytes
- the starting offset in the given Memory.numItems
- the number of serialized items contained in the Memorypublic String toString(Long item)
ArrayOfItemsSerDe
toString
in class ArrayOfItemsSerDe<Long>
item
- a specific itempublic Class<Long> getClassOfT()
ArrayOfItemsSerDe
getClassOfT
in class ArrayOfItemsSerDe<Long>
Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.