public final class BitPositionUtil
extends java.lang.Object
Constructor and Description |
---|
BitPositionUtil() |
Modifier and Type | Method and Description |
---|---|
static long |
alignTo(int alignmentValue,
long bitPosition)
Aligns the bit size to the given alignment value.
|
static long |
bitsToBytes(long numBits)
Converts a given bits value into a byte value.
|
static long |
bytesToBits(long numBytes)
Converts a given bytes value into a bits value.
|
public static long alignTo(int alignmentValue, long bitPosition)
alignmentValue
- Value to align.bitPosition
- Current bit position where to apply alignment.public static long bitsToBytes(long numBits)
numBits
- The number of bits to convert.public static long bytesToBits(long numBytes)
numBytes
- The number of bytes to convert.Last updated 2024-12-05 10:34:50