sam.io
Class BitOutputStream

java.lang.Object
  |
  +--sam.io.BitOutputStream

public class BitOutputStream
extends java.lang.Object

Bit-level output stream.

See Also:
BitInputStream

Constructor Summary
protected BitOutputStream(java.io.OutputStream delegee)
           
 
Method Summary
 void close()
           
 void flush()
          This does NOT write current buffer but simply forwards the flush call to the underlying stream.
protected  void storeAndflush()
          To be called only on exit, because of possibly remaining bytes !
 void write(boolean bit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitOutputStream

protected BitOutputStream(java.io.OutputStream delegee)
Method Detail

write

public void write(boolean bit)
           throws java.io.IOException
java.io.IOException

storeAndflush

protected void storeAndflush()
                      throws java.io.IOException
To be called only on exit, because of possibly remaining bytes !

java.io.IOException

flush

public void flush()
           throws java.io.IOException
This does NOT write current buffer but simply forwards the flush call to the underlying stream.

Flushing current buffer would lead to inconsistencies in case of subsequent writes, and is thus disabled.

java.io.IOException

close

public void close()
           throws java.io.IOException
java.io.IOException