| java.lang.Object java.net.NetworkInterface
NetworkInterface | final public class NetworkInterface extends Object (Code) | | This class provides an methods that are used to get information about the
network interfaces supported by the system
|
Constructor Summary | |
| NetworkInterface(String name, String displayName, InetAddress addresses, int interfaceIndex) This constructor is used by the native method in order to construct the
NetworkInterface objects in the array that it returns
Parameters: name - internal name associated with the interface Parameters: displayName - a user interpretable name for the interface Parameters: addresses - the Internet addresses associated with the interface Parameters: interfaceIndex - an index for the interface. |
NO_INTERFACE_INDEX | final static int NO_INTERFACE_INDEX(Code) | | |
UNSET_INTERFACE_INDEX | final static int UNSET_INTERFACE_INDEX(Code) | | |
NetworkInterface | NetworkInterface(String name, String displayName, InetAddress addresses, int interfaceIndex)(Code) | | This constructor is used by the native method in order to construct the
NetworkInterface objects in the array that it returns
Parameters: name - internal name associated with the interface Parameters: displayName - a user interpretable name for the interface Parameters: addresses - the Internet addresses associated with the interface Parameters: interfaceIndex - an index for the interface. Only set for platforms thatsupport IPV6 |
equals | public boolean equals(Object obj)(Code) | | Compares the specified object to this NetworkInterface and answer if they
are equal. The object must be an instance of NetworkInterface with the
same name, displayName and list of network interfaces to be the same
Parameters: obj - the object to compare true if the specified object is equal to this NetworkInterfcae,false otherwise See Also: NetworkInterface.hashCode |
getByInetAddress | public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException(Code) | | Answers the network interface which has the specified internet address
bound to it, if one exists.
Parameters: address - address of interest network interface for internet address specified if it exists,otherwise null throws: SocketException - if an error occurs when getting network interface information throws: NullPointerException - if the address passed in is null |
getByName | public static NetworkInterface getByName(String interfaceName) throws SocketException(Code) | | Answers the network interface with the specified name, if one exists
network interface for name specified if it exists, otherwise null throws: SocketException - if an error occurs when getting network interface information throws: NullPointerException - if the interface name passed in is null |
getDisplayName | public String getDisplayName()(Code) | | Answers the user readable name associated with the network interface
display name associated with the network interface or null if oneis not available |
getFirstAddress | InetAddress getFirstAddress()(Code) | | Answers the first address for the network interface. This is used in the
natives when we need one of the addresses for the interface and any one
will do
the first address if one exists, otherwise null. |
getIndex | int getIndex()(Code) | | Answers the index for the network interface. Unless the system supports
IPV6 this will be 0.
the index |
getInetAddresses | public Enumeration<InetAddress> getInetAddresses()(Code) | | Answers the list of internet addresses bound to the interface
list of internet addresses bound to the interface |
getName | public String getName()(Code) | | Answers the name associated with the network interface
name associated with the network interface |
getNetworkInterfaces | public static Enumeration<NetworkInterface> getNetworkInterfaces() throws SocketException(Code) | | Answers the list of network interfaces supported by the system or null if
no interfaces are supported by the system
Enumeration containing one NetworkInterface object for eachinterface supported by the system throws: SocketException - if an error occurs when getting network interface information |
hashCode | public int hashCode()(Code) | | Answers a hash code for this NetworkInterface object. Since the name
should be unique for each network interface the hash code is generated
using this name
the hashcode for hashtable indexing |
toString | public String toString()(Code) | | Answers a string containing a concise, human-readable description of the
network interface
a printable representation for the network interface |
|
|