Interface BitOutputStream

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void write​(boolean bit)
      Write a single bit specified in the boolean argument.
      void write​(boolean bit, long repeat)
      Write a single bit specified in the boolean argument repeatedly.
      void write​(byte bitContainer, int nofBits)
      Write specified number of bits supplied in the byte value.
      void write​(int bitContainer, int nofBits)
      Write specified number of bits supplied in the integer value.
      void write​(long bitContainer, int nofBits)
      Write specified number of bits supplied in the long value.
    • Method Detail

      • write

        void write​(int bitContainer,
                   int nofBits)
            throws IOException
        Write specified number of bits supplied in the integer value. The method is naturally limited to 32 bits max.
        Parameters:
        bitContainer - an integer containing the bits to be written out
        nofBits - the number of bits to written out, minimum 0, maximum 32.
        Throws:
        IOException - as per streaming contract in java.
      • write

        void write​(long bitContainer,
                   int nofBits)
            throws IOException
        Write specified number of bits supplied in the long value. The method is naturally limited to 64 bits max.
        Parameters:
        bitContainer - an integer containing the bits to be written out
        nofBits - the number of bits to written out, minimum 0, maximum 64.
        Throws:
        IOException - as per streaming contract in java.
      • write

        void write​(byte bitContainer,
                   int nofBits)
            throws IOException
        Write specified number of bits supplied in the byte value. The method is naturally limited to 8 bits max.
        Parameters:
        bitContainer - an integer containing the bits to be written out
        nofBits - the number of bits to written out, minimum 0, maximum 8.
        Throws:
        IOException - as per streaming contract in java.
      • write

        void write​(boolean bit)
            throws IOException
        Write a single bit specified in the boolean argument.
        Parameters:
        bit - emit 1 if true, 0 otherwise.
        Throws:
        IOException - as per streaming contract in java.
      • write

        void write​(boolean bit,
                   long repeat)
            throws IOException
        Write a single bit specified in the boolean argument repeatedly.
        Parameters:
        bit - emit 1 if true, 0 otherwise.
        repeat - the number of bits to emit.
        Throws:
        IOException - as per streaming contract in java.