willow-utils/src/main/java/com/btr/proxy/selector/pac/PacScriptMethods.java
@Override
  public int dnsDomainLevels(String host) {
    int count = 0;
    int startPos = 0;
    while ((startPos = host.indexOf(".", startPos + 1)) > -1) {
      count++;
    }
    return count;
  }
@Override
  public int dnsDomainLevels(String host) {
    int count = 0;
    int startPos = 0;
    while ((startPos = host.indexOf(".", startPos + 1)) > -1) {
      count++;
    }
    return count;
  }
@ Override public int dnsDomainLevels ( String host ) { int count = 0 ; int startPos = 0 ; while ( ( startPos = host . indexOf ( "." , startPos + 1 ) ) > - 1 ) { count ++ ; } return count ; }
***********************************************************************
Returns the number of DNS domain levels (number of dots) in the host name.

@param host
is the host name from the URL.
@return number of DNS domain levels.
**********************************************************************
*********************************************************************** Returns the number of DNS domain levels ( number of dots ) in the host name .