Class BitFileBuffered.BitInBuffered

    • Field Detail

      • inBuffer

        protected byte[] inBuffer
        buffer for the slice of the file being read
      • size

        protected int size
        size of the buffer
      • readByteOffset

        protected int readByteOffset
        byte offset within the buffer
    • Constructor Detail

      • BitInBuffered

        protected BitInBuffered()
        empty constructor for child classes
      • BitInBuffered

        public BitInBuffered​(RandomDataInput file,
                             long startByteOffset,
                             byte _bitOffset,
                             int _bufLength)
        Construct a new BitInBuffered on the specified file, starting at the given offset and with the specified buffer length.
        Parameters:
        file - File to seek on
        startByteOffset - Start byte offset
        _bitOffset - Start bit offset
        _bufLength - Number of bytes to buffer
    • Method Detail

      • incrByte

        protected void incrByte()
        Move forward one byte
        Specified by:
        incrByte in class BitInBase
      • incrByte

        protected void incrByte​(int i)
        Move forward i bytes
        Specified by:
        incrByte in class BitInBase
      • skipBytes

        public void skipBytes​(long len)
                       throws java.io.IOException
        Skip a number of bytes while reading the bit file. After this opteration, getBitOffset() == 0, so use skipBits(int) to get getBitOffset() to desired value.
        Parameters:
        len - The number of bytes to skip
        Throws:
        java.io.IOException - if an I/O error occurs
      • close

        public void close()
        Does nothing