Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.net

Class NetworkInterface

java.lang.Object
|
+--java.net.NetworkInterface


public final class NetworkInterface

extends Object

Since:Author:

Method Summary

booleanequals(java.lang.Object obj)

Checks if the current instance is equal to obj
static java.net.NetworkInterfacegetByInetAddress(java.net.InetAddress addr)

Return a network interface by its address
static java.net.NetworkInterfacegetByName(java.lang.String name)

Returns an network interface by name
java.lang.StringgetDisplayName()

Returns the display name of the interface
java.util.EnumerationgetInetAddresses()

Returns all available addresses of the network interface If a @see SecurityManager is available all addresses are checked with @see SecurityManager::checkConnect() if they are available.
java.lang.StringgetName()

Returns the name of the network interface
static java.util.EnumerationgetNetworkInterfaces()

Return an Enumeration of all available network interfaces
inthashCode()

Returns the hashcode of the current instance
java.lang.StringtoString()

Returns a string representation of the interface

Method Details

equals

public boolean equals(java.lang.Object obj)

Checks if the current instance is equal to obj

Parameters:


getByInetAddress

public static NetworkInterface getByInetAddress(java.net.InetAddress addr)

Return a network interface by its address

Parameters:

Throws:


getByName

public static NetworkInterface getByName(java.lang.String name)

Returns an network interface by name

Parameters:

Throws:


getDisplayName

public String getDisplayName()

Returns the display name of the interface


getInetAddresses

public Enumeration getInetAddresses()

Returns all available addresses of the network interface If a @see SecurityManager is available all addresses are checked with @see SecurityManager::checkConnect() if they are available. Only InetAddresses are returned where the security manager doesn't thrown an exception.

Returns:


getName

public String getName()

Returns the name of the network interface


getNetworkInterfaces

public static Enumeration getNetworkInterfaces()

Return an Enumeration of all available network interfaces

Throws:


hashCode

public int hashCode()

Returns the hashcode of the current instance


toString

public String toString()

Returns a string representation of the interface