org.limitless.util
Class BitSource
java.lang.Object
org.limitless.util.BitSource
public class BitSource
- extends java.lang.Object
|
Constructor Summary |
BitSource(int[] rawSource)
|
BitSource(int[] rawSource,
int startingPoint)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
source
private int[] source
currentEntryIndex
private int currentEntryIndex
bitIndex
private int bitIndex
BitSource
public BitSource(int[] rawSource,
int startingPoint)
BitSource
public BitSource(int[] rawSource)
getCopy
public BitSource getCopy()
reset
public void reset(int startingPoint)
reset
public void reset()
skipAheadBytes
public void skipAheadBytes(int bytesToSkip)
- This skips ahead bytes, leaving the bit position un-affected
getBytePosition
public int getBytePosition()
getBitPosition
public int getBitPosition()
getSourceLength
public int getSourceLength()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
isBitAvailable
public boolean isBitAvailable()
- This function returns true if a request to fetch a bit will work
getNextBit
public boolean getNextBit()
getBits
public int getBits(int bitCount)
get8
public int get8()
get16
public int get16()
get32
public long get32()
getNullTerminatedString
public java.lang.String getNullTerminatedString()
getSizedString
public java.lang.String getSizedString(int bytesToRead)
getRawBits
private long getRawBits(int bits)
main
public static void main(java.lang.String[] args)
Copyright © 1995, 2004 Limitless Knowledge Association, All Rights Reserved.