lt.monarch.image.gif
Class BitToFile

java.lang.Object
  extended by lt.monarch.image.gif.BitToFile

public class BitToFile
extends java.lang.Object


Constructor Summary
Constructor and Description
BitToFile(java.io.OutputStream dataOutput_)
          Constructor initialize necessary values.
 
Method Summary
Modifier and Type Method and Description
 void Flush()
          Sends bits to output stream, if bits are in buffer.
 void WriteBits(int bits, int numbits)
          Sends bits to output stream, if buffer is full.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitToFile

public BitToFile(java.io.OutputStream dataOutput_)
Constructor initialize necessary values.

Parameters:
dataOutput_ - output stream, where send bits.
Method Detail

Flush

public void Flush()
           throws java.io.IOException
Sends bits to output stream, if bits are in buffer.

Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.

WriteBits

public void WriteBits(int bits,
                      int numbits)
               throws java.io.IOException
Sends bits to output stream, if buffer is full. Otherwise sends bits to buffer.

Parameters:
bits - bits that must be send
numbits - number of sending bits
Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.