java.net
public
final
class
java.net.NetworkInterface
This class provides an methods that are used to get information about the
network interfaces supported by the system
Summary
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Methods
public
boolean
equals(Object obj)
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 |
Returns
- true if the specified object is equal to this NetworkInterfcae,
false otherwise
Returns the network interface which has the specified internet address
bound to it, if one exists.
Parameters
address
| address of interest |
Returns
- network interface for internet address specified if it exists,
otherwise null
Returns the network interface with the specified name, if one exists
Returns
- network interface for name specified if it exists, otherwise null
public
String
getDisplayName()
Returns the user readable name associated with the network interface
Returns
- display name associated with the network interface or null if one
is not available
Returns the list of internet addresses bound to the interface
Returns
- list of internet addresses bound to the interface
public
String
getName()
Returns the name associated with the network interface
Returns
- name associated with the network interface
Returns the list of network interfaces supported by the system or null if
no interfaces are supported by the system
Returns
- Enumeration containing one NetworkInterface object for each
interface supported by the system
Throws
SocketException
| if an error occurs when getting network interface information
|
public
int
hashCode()
Returns 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
Returns
- the hashcode for hashtable indexing
public
String
toString()
Returns a string containing a concise, human-readable description of the
network interface
Returns
- a printable representation for the network interface