public static boolean isBitOn(int value, int bitNumber) {
    ensureBitRange(bitNumber);
    return ((value & MASKS[bitNumber - 1]) == MASKS[bitNumber - 1]);
  }
public static boolean isBitOn ( int value , int bitNumber ) { ensureBitRange ( bitNumber ) ; return ( ( value & MASKS [ bitNumber - 1 ] ) == MASKS [ bitNumber - 1 ] ) ; }
Check if the bit is set to '1'
@param value integer to check bit
@param number of bit to check (right first bit starting at 1)