|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--java.net.InetAddress
A class that represents Internet addresses.
| Method Summary | |
boolean |
equals(Object obj)
Compares this object against the specified object. |
byte[] |
getAddress()
Returns the raw IP address in network byte order. |
static InetAddress[] |
getAllByName(String host)
Given a hostname, returns an array of all the corresponding InetAddresses. |
static InetAddress |
getByName(String host)
Returns a network address for the indicated host. |
String |
getHostAddress()
Returns the IP address string "%d.%d.%d.%d" |
String |
getHostName()
Gets the hostname for this address; also the key in the hashtable. |
static InetAddress |
getLocalHost()
Returns the local host. |
int |
hashCode()
Returns a hashcode for this InetAddress. |
String |
toString()
Converts the InetAddress to a String. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public String getHostName()
public byte[] getAddress()
public String getHostAddress()
public int hashCode()
hashCode in class ObjectHashtablepublic boolean equals(Object obj)
equals in class Objectobj - the object to compare against.
Hashtablepublic String toString()
toString in class Object
public static InetAddress getByName(String host)
throws UnknownHostException
host - the specified host
UnknownHostException - If the address is unknown.
public static InetAddress[] getAllByName(String host)
throws UnknownHostException
UnknownHostException - If the host name could not be resolved
public static InetAddress getLocalHost()
throws UnknownHostException
UnknownHostException - If the host name could not be resolved
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||