|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.berkeley.nlp.lm.bits.BitStream
public final class BitStream
Wraps a portion of a long[] array with iterator-like functionality over a stream of bits.
Constructor Summary | |
---|---|
BitStream(LongArray data,
long start,
int startBit,
int numBits)
|
Method Summary | |
---|---|
void |
advance(int n)
Advances without returning any bits. |
boolean |
finished()
|
void |
mark()
Sets a mark at the current bit that can be returned to using rewindToMark. |
long |
next(int n)
Read and return next n bits. |
boolean |
nextBit()
|
int |
nextConsecutiveZeros()
Reads a string of zeros followed by a 1. |
int |
numBitsLeft()
|
void |
rewind(int i)
|
void |
rewindToMark()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitStream(LongArray data, long start, int startBit, int numBits)
Method Detail |
---|
public boolean nextBit()
public int nextConsecutiveZeros()
public long next(int n)
n
-
public boolean finished()
public void rewind(int i)
public int numBitsLeft()
public void advance(int n)
n
- public void mark()
public void rewindToMark()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |