Class BitStream.In

  • Enclosing class:
    BitStream

    public static class BitStream.In
    extends java.lang.Object
    A bit input stream.
    • Constructor Summary

      Constructors 
      Constructor Description
      In​(java.io.InputStream in)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the stream.
      int readBit()
      Read a bit.
      int readGolomb​(int divisor)
      Read a value that is stored as a Golomb code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • In

        public In​(java.io.InputStream in)
    • Method Detail

      • readGolomb

        public int readGolomb​(int divisor)
        Read a value that is stored as a Golomb code.
        Parameters:
        divisor - the divisor
        Returns:
        the value
      • readBit

        public int readBit()
        Read a bit.
        Returns:
        the bit (0 or 1)
      • close

        public void close()
        Close the stream. This will also close the underlying stream.