Class BitReader
public class BitReader
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBitReader(byte... data) BitReader(byte[] data, int startByte) BitReader(ByteBuffer data, int startByte, int skipBits) -
Method Summary
Modifier and TypeMethodDescriptionintget(int bits) booleanintintReturns the number of bits read since the start position.intvoidreset()voidsetPosition(int position) voidskip(int bits) Skips the specified number of bits without returning them.
-
Field Details
-
END_OF_DATA
public static final int END_OF_DATA- See Also:
-
-
Constructor Details
-
BitReader
public BitReader(byte... data) -
BitReader
public BitReader(byte[] data, int startByte) -
BitReader
-
-
Method Details
-
get
public int get(int bits) -
getNextBit
public int getNextBit() -
getBoolean
public boolean getBoolean() -
getPosition
public int getPosition()Returns the number of bits read since the start position.- Returns:
- bits consumed since construction (or last reset)
-
skip
public void skip(int bits) Skips the specified number of bits without returning them.- Parameters:
bits- number of bits to skip
-
setPosition
public void setPosition(int position) -
remaining
public int remaining() -
reset
public void reset()
-