ccs.utils
Class BitStringReader

java.lang.Object
  extended by ccs.utils.BitStringReader

public class BitStringReader
extends java.lang.Object

A BitStringReader accepts a bytestring and feeds it back one bit at a time. The treatment is big-endian: the high-order byte is byte 0, and the first bit returned is the high-order bit of that byte,


Constructor Summary
BitStringReader(byte[] bytes)
          Construct a new BitString to feed the supplied bytestring.
 
Method Summary
 int next()
          returns the next bit, or -1 if there are no bits left.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitStringReader

public BitStringReader(byte[] bytes)
Construct a new BitString to feed the supplied bytestring. The bytstring is not copied: any changes to it will be reflected in the output.

Method Detail

next

public int next()
returns the next bit, or -1 if there are no bits left.