BitSource class
This provides an easy abstraction to read bits at a time from a sequence of bytes, where the number of bits read is not often a multiple of 8.
This class is thread-safe but not reentrant -- unless the caller modifies the bytes array it passed in, in which case all bets are off.
@author Sean Owen
Constructors
Properties
- bitOffset → int
-
@return index of next bit in current byte which would be read by the next call to {@link #readBits(int)}.
no setter
- byteOffset → int
-
@return index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
available(
) → int - @return number of bits that can be read successfully
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readBits(
int numBits) → int -
@param numBits number of bits to read
@return int representing the bits read. The bits will appear as the least-significant
bits of the int
@throws IllegalArgumentException if numBits isn't in
1,32
or more than is available -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited