| Modifier and Type | Field and Description |
|---|---|
byte[] |
bytes
Sequence of bits padded with unused bits.
|
int |
unusedBits
Number of unused bits in the last byte.
|
| Constructor and Description |
|---|
BitString(boolean[] values) |
BitString(byte[] bytes,
int unusedBits) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBit(int bit) |
void |
setBit(int bit,
boolean value) |
boolean[] |
toBooleanArray() |
public final byte[] bytes
public final int unusedBits
public BitString(byte[] bytes,
int unusedBits)
bytes - array of bytes that represents bit string,
including unused bitsunusedBits - number of unused bitsIllegalArgumentException - - if parameters are invalidpublic BitString(boolean[] values)