Class BitBuffer


  • public class BitBuffer
    extends java.lang.Object
    A bit wise reader writer around a bytebuffer.
    Author:
    Ritchie
    • Constructor Summary

      Constructors 
      Constructor Description
      BitBuffer​(java.nio.ByteBuffer writeBuffer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int bitbuffer()  
      int missingBitsInCurrentByte()  
      void movePosition​(int i)  
      void putByte​(byte byteToAdd)  
      void putByte​(byte byteToAdd, int bits)  
      void putInt​(int i)
      write out int value to the next 4 bytes of the buffer
      void putInt​(int i, int bits)  
      void putLong​(long l, int bits)  
      • Methods inherited from class java.lang.Object

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

      • BitBuffer

        public BitBuffer​(java.nio.ByteBuffer writeBuffer)
    • Method Detail

      • bitbuffer

        public int bitbuffer()
      • missingBitsInCurrentByte

        public int missingBitsInCurrentByte()
      • movePosition

        public void movePosition​(int i)
      • putByte

        public void putByte​(byte byteToAdd)
      • putByte

        public void putByte​(byte byteToAdd,
                            int bits)
      • putInt

        public void putInt​(int i)
        write out int value to the next 4 bytes of the buffer
        Parameters:
        i - integer to write
      • putInt

        public void putInt​(int i,
                           int bits)
      • putLong

        public void putLong​(long l,
                            int bits)