API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.net. NetworkInterface View Source
Author(s)
Since
1.4
Version
Serial
Hierarchy
 Object
      NetworkInterface
Implements
Subclasses
Description
publicfinal class NetworkInterface
  This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface.
See also:   
Constructors
pack-private NetworkInterface ()
  Returns an NetworkInterface object with index set to 0 and name to null.
pack-private NetworkInterface (String name, int index, InetAddress addrs)
Methods
Hide/Show inherited methods
public boolean equals (Object obj)
  Compares this object against the specified object.
pack-privatestaticnative NetworkInterface getByIndex (int index) throws SocketException
  Get a network interface given its index.
publicstatic NetworkInterface getByInetAddress (InetAddress addr) throws SocketException
  Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it.
publicstatic NetworkInterface getByName (String name) throws SocketException
  Searches for the network interface with the specified name.
public String getDisplayName ()
  Get the display name of this network interface.
public byte getHardwareAddress () throws SocketException
  Returns the hardware address (usually MAC) of the interface if it has one and if it can be accessed given the current privileges.
pack-private int getIndex ()
  Get the index of this network interface.
public Enumeration<InetAddress> getInetAddresses ()
  Convenience method to return an Enumeration with all or a subset of the InetAddresses bound to this network interface.
public List<InterfaceAddress> getInterfaceAddresses ()
  Get a List of all or a subset of the InterfaceAddresses of this network interface.
public int getMTU () throws SocketException
  Returns the Maximum Transmission Unit (MTU) of this interface.
public String getName ()
  Get the name of this network interface.
publicstatic Enumeration<NetworkInterface> getNetworkInterfaces () throws SocketException
  Returns all the interfaces on this machine.
public NetworkInterface getParent ()
  Returns the parent NetworkInterface of this interface if this is a subinterface, or null if it is a physical (non virtual) interface or has no parent.
public Enumeration<NetworkInterface> getSubInterfaces ()
  Get an Enumeration with all the subinterfaces (also known as virtual interfaces) attached to this network interface.
public int hashCode ()
public boolean isLoopback () throws SocketException
  Returns whether a network interface is a loopback interface.
public boolean isPointToPoint () throws SocketException
  Returns whether a network interface is a point to point interface.
public boolean isUp () throws SocketException
  Returns whether a network interface is up and running.
public boolean isVirtual ()
  Returns whether this interface is a virtual interface (also called subinterface).
public boolean supportsMulticast () throws SocketException
  Returns whether a network interface supports multicasting or not.
public String toString ()
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar