org.limitless.util
Class BitSource

java.lang.Object
  extended by org.limitless.util.BitSource

public class BitSource
extends java.lang.Object


Field Summary
private  int bitIndex
           
private  int currentEntryIndex
           
private  int[] source
           
 
Constructor Summary
BitSource(int[] rawSource)
           
BitSource(int[] rawSource, int startingPoint)
           
 
Method Summary
 int get16()
           
 long get32()
           
 int get8()
           
 int getBitPosition()
           
 int getBits(int bitCount)
           
 int getBytePosition()
           
 BitSource getCopy()
           
 boolean getNextBit()
           
 java.lang.String getNullTerminatedString()
           
private  long getRawBits(int bits)
           
 java.lang.String getSizedString(int bytesToRead)
           
 int getSourceLength()
           
 boolean isBitAvailable()
          This function returns true if a request to fetch a bit will work
static void main(java.lang.String[] args)
           
 void reset()
           
 void reset(int startingPoint)
           
 void skipAheadBytes(int bytesToSkip)
          This skips ahead bytes, leaving the bit position un-affected
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

private int[] source

currentEntryIndex

private int currentEntryIndex

bitIndex

private int bitIndex
Constructor Detail

BitSource

public BitSource(int[] rawSource,
                 int startingPoint)

BitSource

public BitSource(int[] rawSource)
Method Detail

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.