public abstract class BitRegister
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
bitCount
Number of bits currently stored in the register.
|
static int |
MAX_BIT_COUNT
The maximum number of bits to access.
|
protected long |
register
Bit store.
|
| Modifier and Type | Method and Description |
|---|---|
int |
bitCount()
Get the number of bits currently stored in the register.
|
void |
clear()
Clear all bits.
|
abstract int |
discardBits(int count)
Discard bits from the register.
|
abstract int |
feedBits(byte b)
Feed additional bits to the register.
|
abstract int |
peekBits(int count)
Take a peek at the register's bits.
|
public static final int MAX_BIT_COUNT
protected long register
protected int bitCount
public final void clear()
public final int bitCount()
public abstract int feedBits(byte b)
b - The byte bits to feed.public abstract int peekBits(int count)
count - The number of bits to return.public abstract int discardBits(int count)
count - The number of bits to discard.