public final class Array
extends java.lang.Object
Constructor and Description |
---|
Array(RawArray rawArray,
ArrayTraits arrayTraits,
ArrayType arrayType)
Constructor.
|
Array(RawArray rawArray,
ArrayTraits arrayTraits,
ArrayType arrayType,
OffsetChecker offsetChecker)
Constructor.
|
Array(RawArray rawArray,
ArrayTraits arrayTraits,
ArrayType arrayType,
OffsetChecker offsetChecker,
OffsetInitializer offsetInitializer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
bitSizeOf(long bitPosition)
Gets the bit size of the array if it is stored in the bit stream.
|
int |
bitSizeOfPacked(long bitPosition)
Returns length of the packed array stored in the bit stream in bits.
|
boolean |
equals(java.lang.Object obj) |
<T> T |
getRawArray()
Gets the underlying raw array.
|
int |
hashCode() |
long |
initializeOffsets(long bitPosition)
Initializes indexed offsets for the array.
|
long |
initializeOffsetsPacked(long bitPosition)
Initializes indexed offsets for the packed array.
|
void |
read(BitStreamReader reader)
Reads the array from the bit stream.
|
void |
read(BitStreamReader reader,
int size)
Reads the array from the bit stream.
|
void |
readPacked(BitStreamReader reader)
Reads packed array from the bit stream.
|
void |
readPacked(BitStreamReader reader,
int size)
Reads packed array from the bit stream.
|
int |
size()
Gets the underlying raw array size.
|
void |
write(BitStreamWriter writer)
Writes the array element to the bit stream.
|
void |
writePacked(BitStreamWriter writer)
Writes packed array to the bit stream.
|
public Array(RawArray rawArray, ArrayTraits arrayTraits, ArrayType arrayType)
rawArray
- Raw array to construct from.arrayTraits
- Array traits to construct from.arrayType
- Array type to construct from.public Array(RawArray rawArray, ArrayTraits arrayTraits, ArrayType arrayType, OffsetChecker offsetChecker)
rawArray
- Raw array to construct from.arrayTraits
- Array traits to construct from.arrayType
- Array type to construct from.offsetChecker
- Offset checker to construct from.public Array(RawArray rawArray, ArrayTraits arrayTraits, ArrayType arrayType, OffsetChecker offsetChecker, OffsetInitializer offsetInitializer)
rawArray
- Raw array to construct from.arrayTraits
- Array traits to construct from.arrayType
- Array type to construct from.offsetChecker
- Offset checker to construct from.offsetInitializer
- Offset initializer to construct from.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public <T> T getRawArray()
T
- Java array type to be returned.public int size()
public int bitSizeOf(long bitPosition)
bitPosition
- Current bit position in the bit stream.public int bitSizeOfPacked(long bitPosition)
bitPosition
- Current bit stream position.public long initializeOffsets(long bitPosition)
bitPosition
- Current bit position in the bit stream.public long initializeOffsetsPacked(long bitPosition)
bitPosition
- Current bit stream position.public void read(BitStreamReader reader) throws java.io.IOException
reader
- Bit stream reader to read from.java.io.IOException
- Failure during bit stream manipulation.public void read(BitStreamReader reader, int size) throws java.io.IOException
reader
- Bit stream reader to read from.size
- Number of elements stored in the array which shall be read.java.io.IOException
- Failure during bit stream manipulation.public void readPacked(BitStreamReader reader) throws java.io.IOException
reader
- Bit stream from which to read.java.io.IOException
- Failure during bit stream manipulation.public void readPacked(BitStreamReader reader, int size) throws java.io.IOException
reader
- Bit stream from which to read.size
- Number of elements to read.java.io.IOException
- Failure during bit stream manipulation.public void write(BitStreamWriter writer) throws java.io.IOException
writer
- Bit stream write to write to.java.io.IOException
- Failure during bit stream manipulation.public void writePacked(BitStreamWriter writer) throws java.io.IOException
writer
- Bit stream where to write.java.io.IOException
- Failure during bit stream manipulation.Last updated 2024-12-05 10:34:50