Class BitOutputStream

java.lang.Object
eu.svjatoslav.commons.data.BitOutputStream

public class BitOutputStream extends Object
Write individual bits to the output stream.
  • Constructor Details

    • BitOutputStream

      public BitOutputStream(OutputStream outputStream)
  • Method Details

    • finishByte

      public void finishByte() throws IOException
      Finish writing the last byte.
      Throws:
      IOException - If an I/O error occurs.
    • storeBits

      public void storeBits(int data, int bitCount) throws IOException
      Write bits to the output stream.
      Parameters:
      data - Data to write.
      bitCount - Number of bits to write.
      Throws:
      IOException - If an I/O error occurs.