NetworkInterface

public final class NetworkInterface extends Object

This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface. It is used to identify the local interface on which a multicast group is joined. Interfaces are normally known by names such as "le0".

Public Method Summary

boolean
equals(Object obj)
Compares this object against the specified object.
static NetworkInterface
getByIndex(int index)
Get a network interface given its index.
static NetworkInterface
getByInetAddress(InetAddress addr)
Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.
static NetworkInterface
getByName(String name)
Searches for the network interface with the specified name.
String
getDisplayName()
Get the display name of this network interface.
byte[]
getHardwareAddress()
Returns the hardware address (usually MAC) of the interface if it has one and if it can be accessed given the current privileges.
int
getIndex()
Returns the index of this network interface.
Enumeration<InetAddress>
getInetAddresses()
Convenience method to return an Enumeration with all or a subset of the InetAddresses bound to this network interface.
List<InterfaceAddress>
getInterfaceAddresses()
Get a List of all or a subset of the