code: public Location getLocation(String str) {
          InetAddress addr;
          try {
              addr = InetAddress.getByName(str);
          } catch (UnknownHostException e) {
              return null;
          }
  
          return getLocation(addr);
      }
docs: for GeoIP City only