Other InetAddress Services
public boolean isMulticastAddress();
static InetAddress[] getAllByName(String host);
Determines all the IP addresses of a host,
static InetAddress getByName(String host);
Determines the IP address of a host,
Let’s duplicate the basic service of the Unix command “nslookup” in Java. This will allow us to convert any IP name into its valid IP number. (We won’t support the -opt switches, to keep things simple.) From the Unix “nslookup man page(1M)”:
“nslookup is an interactive program to query ARPA Internet domain name servers. The user can contact servers to request information about a specific host, or print a list of hosts in the domain.”