uk.me.parabola.imgfmt.app
Class BitWriter

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.BitWriter

public class BitWriter
extends java.lang.Object

A class to write the bitstream.

Author:
Steve Ratcliffe

Constructor Summary
BitWriter()
           
 
Method Summary
 byte[] getBytes()
           
 int getLength()
           
 void put1(boolean b)
           
 void putn(int bval, int nb)
          Put a number of bits into the buffer, growing it if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitWriter

public BitWriter()
Method Detail

put1

public void put1(boolean b)

putn

public void putn(int bval,
                 int nb)
Put a number of bits into the buffer, growing it if necessary.

Parameters:
bval - The bits to add, the lowest n bits will be added to the buffer.
nb - The number of bits.

getBytes

public byte[] getBytes()

getLength

public int getLength()