java.net
Class VMInetAddress

java.lang.Object
java.net.VMInetAddress
- All Implemented Interfaces:
- java.io.Serializable
- class VMInetAddress
- extends java.lang.Object
- implements java.io.Serializable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VMInetAddress
VMInetAddress()
getLocalHostname
public static java.lang.String getLocalHostname()
- This method looks up the hostname of the local machine
we are on. If the actual hostname cannot be determined, then the
value "localhost" will be used. This native method wrappers the
"gethostname" function.
lookupInaddrAny
public static byte[] lookupInaddrAny()
throws UnknownHostException
- Returns the value of the special address INADDR_ANY
getHostByAddr
public static java.lang.String getHostByAddr(byte[] ip)
throws UnknownHostException
- This method returns the hostname for a given IP address. It will
throw an UnknownHostException if the hostname cannot be determined.
getHostByName
public static byte[][] getHostByName(java.lang.String hostname)
throws UnknownHostException
- Returns a list of all IP addresses for a given hostname. Will throw
an UnknownHostException if the hostname cannot be resolved.