InetAddress.getByName

InetAddress.getByName

Class Overview | Class Members | This Package | All Packages

Syntax
public static InetAddress getByName( String host ) throws UnknownHostException
Parameters
host
the specified host, or null for the local host.
Returns
an IP address for the given host name.
Description
Determines the IP address of a host, given the host's name. The host name can either be a machine name, such as "java.sun.com", or a string representing its IP address, such as "206.26.48.100".

Exceptions
UnknownHostException if no IP address for the host could be found.