static boolean checkBit(int pos, ByteBuff bloomBuf, int bloomOffset) {
    int bytePos = pos >> 3; // pos / 8
    int bitPos = pos & 0x7; // pos % 8
    byte curByte = bloomBuf.get(bloomOffset + bytePos);
    curByte &= bitvals[bitPos];
    return (curByte != 0);
  }
Check if bit at specified index is 1.
@param pos index of bit
@return true if bit at specified index is 1, false if 0.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java