Try this:
InetAddress address = InetAddress.getByName(new URL(urlString).getHost());
To get the raw IP:
String ip = address.getHostAddress();
Try this:
InetAddress address = InetAddress.getByName(new URL(urlString).getHost());
To get the raw IP:
String ip = address.getHostAddress();