public class ArrayOfBooleansSerDe extends ArrayOfItemsSerDe<Boolean>
| Constructor and Description |
|---|
ArrayOfBooleansSerDe() |
| Modifier and Type | Method and Description |
|---|---|
static int |
computeBytesNeeded(int arrayLength)
Computes number of bytes needed for packed bit encoding of the array of booleans.
|
Boolean[] |
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.
|
Boolean[] |
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<Boolean> |
getClassOfT()
Returns the concrete class of type T
|
byte[] |
serializeToByteArray(Boolean item)
Serialize a single unserialized item to a byte array.
|
byte[] |
serializeToByteArray(Boolean[] items)
Serialize an array of unserialized items to a byte array of contiguous serialized items.
|
int |
sizeOf(Boolean item)
Returns the serialized size in bytes of a single unserialized item.
|
int |
sizeOf(Boolean[] 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(Boolean item)
Returns a human readable string of an item.
|
public static int computeBytesNeeded(int arrayLength)
arrayLength - Number of items in the array to serializepublic byte[] serializeToByteArray(Boolean item)
ArrayOfItemsSerDeserializeToByteArray in class ArrayOfItemsSerDe<Boolean>item - the item to be serializedpublic byte[] serializeToByteArray(Boolean[] items)
ArrayOfItemsSerDeserializeToByteArray in class ArrayOfItemsSerDe<Boolean>items - array of items to be serializedpublic Boolean[] deserializeFromMemory(org.apache.datasketches.memory.Memory mem, int numItems)
ArrayOfItemsSerDedeserializeFromMemory in class ArrayOfItemsSerDe<Boolean>mem - Memory containing a contiguous sequence of serialized itemsnumItems - number of items in the contiguous serialized sequence.ArrayOfItemsSerDe.deserializeFromMemory(Memory, long, int)public Boolean[] deserializeFromMemory(org.apache.datasketches.memory.Memory mem, long offsetBytes, int numItems)
ArrayOfItemsSerDedeserializeFromMemory in class ArrayOfItemsSerDe<Boolean>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(Boolean item)
ArrayOfItemsSerDesizeOf in class ArrayOfItemsSerDe<Boolean>item - a specific itempublic int sizeOf(Boolean[] items)
ArrayOfItemsSerDesizeOf in class ArrayOfItemsSerDe<Boolean>items - an array of items.public int sizeOf(org.apache.datasketches.memory.Memory mem,
long offsetBytes,
int numItems)
ArrayOfItemsSerDesizeOf in class ArrayOfItemsSerDe<Boolean>mem - the given Memory.offsetBytes - the starting offset in the given Memory.numItems - the number of serialized items contained in the Memorypublic String toString(Boolean item)
ArrayOfItemsSerDetoString in class ArrayOfItemsSerDe<Boolean>item - a specific itempublic Class<Boolean> getClassOfT()
ArrayOfItemsSerDegetClassOfT in class ArrayOfItemsSerDe<Boolean>Copyright © 2015–2024 The Apache Software Foundation. All rights reserved.