def read_bit_as_integer(bitlen)
      if self.length * 8 - bit_pointer < bitlen
        raise BinaryException.new("Rest of self length(#{self.length * 8 - bit_pointer}bit) "+
                                  "is shorter than specified bit length(#{bitlen}bit).")
      end
      if bit_pointer % 8 == 0 && bitlen % 8 == 0
        return read_byte_as_integer(bitlen/8)
      else
        response = 0
        bitlen.times do
          response = response << 1
          response += read_one_bit
        end
        return response
      end
    end
def read_bit_as_integer(bitlen)
      if self.length * 8 - bit_pointer < bitlen
        raise BinaryException.new("Rest of self length(#{self.length * 8 - bit_pointer}bit) "+
                                  "is shorter than specified bit length(#{bitlen}bit).")
      end
      if bit_pointer % 8 == 0 && bitlen % 8 == 0
        return read_byte_as_integer(bitlen/8)
      else
        response = 0
        bitlen.times do
          response = response << 1
          response += read_one_bit
        end
        return response
      end
    end
----------------------------------------------------------------
 :section: Read methods
 These methods have access pointer similar to IO#read.
 ----------------------------------------------------------------
 Read specified length of bits and return as Integer instance.
 Bit pointer proceed for that length.