Modifier and Type | Field and Description |
---|---|
private InetAddress[] | |
private InterfaceAddress[] | |
private NetworkInterface[] | |
private static final NetworkInterface | |
private String | |
private int | |
private String | |
private NetworkInterface | |
private boolean |
Access | Constructor and Description |
---|---|
pack-priv | |
pack-priv |
Modifier and Type | Method and Description |
---|---|
private static native boolean | |
private static <T> Enumeration | |
public boolean | Returns: true if the objects are the same;
false otherwise.the object to compare against. obj)Overrides java. Compares this object against the specified object. |
private static native NetworkInterface[] | |
public static NetworkInterface | Returns: the NetworkInterface obtained from its index, ornull if
there is no interface with such an index on the systeman integer, the index of the interface index)Get a network interface given its index. |
private static native NetworkInterface | |
public static NetworkInterface | Returns: ANetworkInterface
or null if there is no network interface
with the specified IP address.The addr)InetAddress to search with.Convenience method to search for a network interface that has the specified Internet Protocol (IP) address bound to it. |
private static native NetworkInterface | |
public static NetworkInterface | |
private static native NetworkInterface | |
private InetAddress[] | |
pack-priv static NetworkInterface | |
public String | Returns: a non-empty string representing the display name of this network interface, or null if no display name is available.Get the display name of this network interface. |
public byte[] | Returns: a byte array containing the address, ornull if
the address doesn't exist, is not accessible or a security
manager is set and the caller does not have the permission
NetPermission("getNetworkInformation")Returns the hardware address (usually MAC) of the interface if it has one and if it can be accessed given the current privileges. |
public int | Returns: the index of this network interface or-1 if the index is
unknownReturns the index of this network interface. |
public Enumeration | Returns: an Enumeration object with all or a subset of the InetAddresses bound to this network interfaceGet an Enumeration with all or a subset of the InetAddresses bound to this network interface. |
public List | Returns: aList object with all or a subset of the
InterfaceAddress of this network interfaceGet a List of all or a subset of the |
private static native byte[] | |
public int | Returns: the value of the MTU for that interface.Returns the Maximum Transmission Unit (MTU) of this interface. |
private static native int | |
public String | |
public static Enumeration | Returns: an Enumeration of NetworkInterfaces found on this machineReturns an |
public NetworkInterface | Returns: TheNetworkInterface this interface is attached to.Returns the parent NetworkInterface of this interface if this is
a subinterface, or |
public Enumeration | Returns: an Enumeration object with all of the subinterfaces of this network interfaceGet an Enumeration with all the subinterfaces (also known as virtual interfaces) attached to this network interface. |
public int | |
public Stream | Returns: a Stream object with all or a subset of the InetAddresses bound to this network interfaceGet a Stream of all or a subset of the InetAddresses bound to this network interface. |
private static native void | |
pack-priv static boolean | Returns: true iff the addr parameter is currently bound to one of the interfaces on this machine.The addr)InetAddress to search with.Checks if the given address is bound to any of the interfaces on this machine. |
public boolean | Returns: true if the interface is a loopback interface.Returns whether a network interface is a loopback interface. |
private static native boolean | |
private static native boolean | |
public boolean | Returns: true if the interface is a point to point
interface.Returns whether a network interface is a point to point interface. |
public boolean | Returns: true if the interface is up and running.Returns whether a network interface is up and running. |
private static native boolean | |
public boolean | Returns: true if this interface is a virtual interface.Returns whether this interface is a virtual interface (also called subinterface). |
public static Stream | Returns: a Stream of NetworkInterfaces found on this machineReturns a |
private static <T> Stream | |
public Stream | Returns: a Stream object with all of the subinterfaces of this network interfaceGet a Stream of all subinterfaces (also known as virtual interfaces) attached to this network interface. |
public boolean | Returns: true if the interface supports Multicasting.Returns whether a network interface supports multicasting or not. |
private static native boolean | |
public String |
addrs | back to summary |
---|---|
private InetAddress[] addrs |
bindings | back to summary |
---|---|
private InterfaceAddress[] bindings |
childs | back to summary |
---|---|
private NetworkInterface[] childs |
defaultInterface | back to summary |
---|---|
private static final NetworkInterface defaultInterface |
displayName | back to summary |
---|---|
private String displayName |
index | back to summary |
---|---|
private int index |
name | back to summary |
---|---|
private String name |
parent | back to summary |
---|---|
private NetworkInterface parent |
virtual | back to summary |
---|---|
private boolean virtual |
NetworkInterface | back to summary |
---|---|
pack-priv NetworkInterface() Returns an NetworkInterface object with index set to 0 and name to null. Setting such an interface on a MulticastSocket will cause the kernel to choose one interface for sending multicast packets. |
NetworkInterface | back to summary |
---|---|
pack-priv NetworkInterface(String name, int index, InetAddress[] addrs) |
boundInetAddress0 | back to summary |
---|---|
private static native boolean boundInetAddress0(InetAddress addr) throws SocketException |
enumerationFromArray | back to summary |
---|---|
private static <T> Enumeration |
equals | back to summary |
---|---|
public boolean equals(Object obj) Overrides java. Compares this object against the specified object.
The result is
Two instances of API Note two
|
getAll | back to summary |
---|---|
private static native NetworkInterface[] getAll() throws SocketException |
getByIndex | back to summary |
---|---|
public static NetworkInterface getByIndex(int index) throws SocketException Get a network interface given its index.
|
getByIndex0 | back to summary |
---|---|
private static native NetworkInterface getByIndex0(int index) throws SocketException |
getByInetAddress | back to summary |
---|---|
public static 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. If the specified IP address is bound to multiple network interfaces it is not defined which network interface is returned.
|
getByInetAddress0 | back to summary |
---|---|
private static native NetworkInterface getByInetAddress0(InetAddress addr) throws SocketException |
getByName | back to summary |
---|---|
public static NetworkInterface getByName(String name) throws SocketException Searches for the network interface with the specified name.
|
getByName0 | back to summary |
---|---|
private static native NetworkInterface getByName0(String name) throws SocketException |
getCheckedInetAddresses | back to summary |
---|---|
private InetAddress[] getCheckedInetAddresses() |
getDefault | back to summary |
---|---|
pack-priv static NetworkInterface getDefault() Returns the default network interface of this system
|
getDisplayName | back to summary |
---|---|
public String getDisplayName() Get the display name of this network interface. A display name is a human readable String describing the network device.
|
getHardwareAddress | back to summary |
---|---|
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.
If a security manager is set, then the caller must have
the permission
|
getIndex | back to summary |
---|---|
public int getIndex() Returns the index of this network interface. The index is an integer greater
or equal to zero, or
|
getInetAddresses | back to summary |
---|---|
public Enumeration Get an Enumeration with all or a subset of the InetAddresses bound to this network interface.
If there is a security manager, its
|
getInterfaceAddresses | back to summary |
---|---|
public List Get a List of all or a subset of the
If there is a security manager, its
|
getMacAddr0 | back to summary |
---|---|
private static native byte[] getMacAddr0(byte[] inAddr, String name, int ind) throws SocketException |
getMTU | back to summary |
---|---|
public int getMTU() throws SocketException Returns the Maximum Transmission Unit (MTU) of this interface.
|
getMTU0 | back to summary |
---|---|
private static native int getMTU0(String name, int ind) throws SocketException |
getName | back to summary |
---|---|
public String getName() Get the name of this network interface.
|
getNetworkInterfaces | back to summary |
---|---|
public static Enumeration Returns an API Note this method can be used in combination with
|
getParent | back to summary |
---|---|
public NetworkInterface getParent() Returns the parent NetworkInterface of this interface if this is
a subinterface, or
|
getSubInterfaces | back to summary |
---|---|
public Enumeration Get an Enumeration with all the subinterfaces (also known as virtual interfaces) attached to this network interface. For instance eth0:1 will be a subinterface to eth0.
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
inetAddresses | back to summary |
---|---|
public Stream Get a Stream of all or a subset of the InetAddresses bound to this network interface.
If there is a security manager, its
|
init | back to summary |
---|---|
private static native void init() |
isBoundInetAddress | back to summary |
---|---|
pack-priv static boolean isBoundInetAddress(InetAddress addr) throws SocketException Checks if the given address is bound to any of the interfaces on this machine.
|
isLoopback | back to summary |
---|---|
public boolean isLoopback() throws SocketException Returns whether a network interface is a loopback interface.
|
isLoopback0 | back to summary |
---|---|
private static native boolean isLoopback0(String name, int ind) throws SocketException |
isP2P0 | back to summary |
---|---|
private static native boolean isP2P0(String name, int ind) throws SocketException |
isPointToPoint | back to summary |
---|---|
public boolean isPointToPoint() throws SocketException Returns whether a network interface is a point to point interface. A typical point to point interface would be a PPP connection through a modem.
|
isUp | back to summary |
---|---|
public boolean isUp() throws SocketException Returns whether a network interface is up and running.
|
isUp0 | back to summary |
---|---|
private static native boolean isUp0(String name, int ind) throws SocketException |
isVirtual | back to summary |
---|---|
public boolean isVirtual() Returns whether this interface is a virtual interface (also called subinterface). Virtual interfaces are, on some systems, interfaces created as a child of a physical interface and given different settings (like address or MTU). Usually the name of the interface will the name of the parent followed by a colon (:) and a number identifying the child since there can be several virtual interfaces attached to a single physical interface.
|
networkInterfaces | back to summary |
---|---|
public static Stream Returns a API Note this method can be used in combination with
|
streamFromArray | back to summary |
---|---|
private static <T> Stream |
subInterfaces | back to summary |
---|---|
public Stream Get a Stream of all subinterfaces (also known as virtual interfaces) attached to this network interface.
|
supportsMulticast | back to summary |
---|---|
public boolean supportsMulticast() throws SocketException Returns whether a network interface supports multicasting or not.
|
supportsMulticast0 | back to summary |
---|---|
private static native boolean supportsMulticast0(String name, int ind) throws SocketException |
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
|