| Constructor and Description | 
|---|
BitOutputStream(Stream out)
Use an OutputStream to produce a BitWriter. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
long | 
nrBits()
Returns the number of bits that have been written to this
 bitOutputStream. 
 | 
void | 
one()
Write a 1 bit. 
 | 
void | 
pad(int width)
Pad the rest of the block with zeros and flush. 
 | 
void | 
write(int bits,
     int width)
Write some bits. 
 | 
void | 
zero()
Write a 0 bit. 
 | 
public BitOutputStream(Stream out)
out - An Output Streampublic long nrBits()
public void one()
         throws IOException
one in interface BitWriterIOExceptionpublic void pad(int width)
         throws IOException
pad in interface BitWriterwidth - The size of the block to pad in bits.
            This will typically be 8, 16, 32, 64, 128, 256, etc.IOExceptionpublic void write(int bits,
                  int width)
           throws IOException
write in interface BitWriterbits - The bits to be written.width - The number of bits to write. (0..32)IOExceptionpublic void zero()
          throws IOException
zero in interface BitWriterIOException