public class BitOutputStore extends Object
Constructor and Description |
---|
BitOutputStore()
Construct bit-writer instance with empty content
|
Modifier and Type | Method and Description |
---|---|
void |
appendBit(int value)
Add a single bit to the bit-writer content.
|
void |
appendBits(int nBitsInValue,
int value)
Adds the specified number of bits from the specified value to the content.
|
byte[] |
getEncodedText()
Gets an array of bytes populated with the content of the encoded text.
|
int |
getEncodedTextLength()
Gets the number of bits stored in the BitOutputStore's content.
|
int |
getEncodedTextLengthInBytes() |
String |
toString() |
public BitOutputStore()
public void appendBit(int value)
value
- an integer value.public void appendBits(int nBitsInValue, int value)
nBitsInValue
- number of bits in the range 1 to 32.value
- an integer containing the bits to be stored.public byte[] getEncodedText()
public int getEncodedTextLength()
public int getEncodedTextLengthInBytes()
Copyright © 2022. All rights reserved.