code: @Override
    public boolean isInNet(String host, String pattern, String mask) {
      host = dnsResolve(host);
      if (host == null || host.length() == 0) {
        return false;
      }
      long lhost = parseIpAddressToLong(host);
      long lpattern = parseIpAddressToLong(pattern);
      long lmask = parseIpAddressToLong(mask);
      return (lhost & lmask) == lpattern;
    }
docs: ***********************************************************************
  Returns true if the IP address of the host matches the specified IP address
  pattern. Pattern and mask specification is done the same way as for SOCKS
  configuration.
  
  Example: isInNet(host, "198.95.0.0", "255.255.0.0") is true if the IP
  address of the host matches 198.95.*.*.
  
  @param host
  a DNS host name, or IP address. If a host name is passed, it will
  be resolved into an IP address by this function.
  @param pattern
  an IP address pattern in the dot-separated format.
  @param mask
  mask for the IP address pattern informing which parts of the IP
  address should be matched against. 0 means ignore, 255 means
  match.
  @return true if it matches else false.
  **********************************************************************