| java.lang.Object | |
| ↳ | java.net.NetworkInterface |
This class is used to represent a network interface of the local device. An interface is defined by its address and a platform dependent name. The class provides methods to get all information about the available interfaces of the system or to identify the local interface of a joined multicast group.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Compares the specified object to this
NetworkInterface and
returns whether they are equal or not. | |||||||||||
Gets the specific network interface according to the given address.
| |||||||||||
Gets the specific network interface according to a given name.
| |||||||||||
Gets the human-readable name associated with this network interface.
| |||||||||||
Gets a list of addresses bound to this network interface.
| |||||||||||
Gets the name associated with this network interface.
| |||||||||||
Gets a list of all network interfaces available on the local system or
null if no interface is available. | |||||||||||
Gets the hashcode for this
NetworkInterface instance. | |||||||||||
Gets a string containing a concise, human-readable description of this
network interface.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
Compares the specified object to this NetworkInterface and
returns whether they are equal or not. The object must be an instance of
NetworkInterface with the same name, displayName and list
of network interfaces to be equal.
| obj | the object to compare with this instance. |
|---|
true if the specified object is equal to this NetworkInterface, false otherwise.Gets the specific network interface according to the given address.
| address | the address to identify the searched network interface. |
|---|
null otherwise.| SocketException | if an error occurs while getting the network interface information. |
|---|---|
| NullPointerException | if the given interface address is invalid. |
Gets the specific network interface according to a given name.
| interfaceName | the name to identify the searched network interface. |
|---|
null otherwise.| SocketException | if an error occurs while getting the network interface information. |
|---|---|
| NullPointerException | if the given interface's name is null. |
Gets the human-readable name associated with this network interface.
Gets a list of addresses bound to this network interface.
Gets the name associated with this network interface.
NetworkInterface instance.Gets a list of all network interfaces available on the local system or
null if no interface is available.
NetworkInterface instances representing the
available interfaces.| SocketException | if an error occurs while getting the network interface information. |
|---|
Gets the hashcode for this NetworkInterface instance. Since the
name should be unique for each network interface the hashcode is
generated using this name.
NetworkInterface instance.Gets a string containing a concise, human-readable description of this network interface.