code: private static InetAddress getInetAddress(String ip) {
      if (ip == null)
        return null;
  
      InetAddress addr = null;
      try {
        addr = InetAddress.getByName(ip);
      } catch (UnknownHostException e) {
        Log.err(e);
        H2O.exit(-1);
      }
      return addr;
    }
docs: Get address for given IP.
  @param ip  textual representation of IP (host)
  @return IPv4 or IPv6 address which matches given IP and is in specified range