|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.net.NetworkInterface
public final class NetworkInterface
This class provides an methods that are used to get information about the network interfaces supported by the system. A network interface can consist of multiple IP addresses assigned to a single interface name.
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares the specified object to this NetworkInterface and answer if they are equal. |
static NetworkInterface |
getByInetAddress(InetAddress address)
Answers the network interface which has the specified inet address bound to it, if one exists. |
static NetworkInterface |
getByName(String interfaceName)
Answers the network interface with the specified name, if one exists |
String |
getDisplayName()
Answers the user readable name associated with the network interface |
Enumeration |
getInetAddresses()
Answers the list of inet addresses bound to the interface |
String |
getName()
Answers the name associated with the network interface |
static Enumeration |
getNetworkInterfaces()
Answers the list of network interfaces supported by the system or null if no interfaces are supported by the system |
int |
hashCode()
Answers a hash code for this NetworkInterface object. |
String |
toString()
Answers a string containing a concise, human-readable description of the network interface |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String getName()
public Enumeration getInetAddresses()
public String getDisplayName()
public static NetworkInterface getByName(String interfaceName)
throws SocketException
interfaceName - name of interface to return
SocketException - if an error occurs when getting network interface information
NullPointerException - if the interface name passed in is nullpublic static NetworkInterface getByInetAddress(InetAddress address)
throws SocketException
address - address of interest
SocketException - if an error occurs when getting network interface information
NullPointerException - if the address passed in is nullpublic static Enumeration getNetworkInterfaces()
throws SocketException
SocketException - if an error occurs when getting network interface informationpublic boolean equals(Object obj)
equals in class Objectobj - the object to compare
hashCodepublic int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class Object
|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||