Constructor and Description |
---|
BitOutputStream(java.io.OutputStream 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. pad(8) flushes the last
unfinished byte.
|
void |
write(int bits,
int width)
Write some bits.
|
void |
zero()
Write a 0 bit.
|
public BitOutputStream(java.io.OutputStream out)
out
- An Output Streampublic long nrBits()
public void one() throws java.io.IOException
public void pad(int width) throws java.io.IOException
public void write(int bits, int width) throws java.io.IOException