Package oshi.hardware.common
Class Networks
java.lang.Object
oshi.hardware.common.Networks
- Direct Known Subclasses:
FreeBsdNetworks,LinuxNetworks,MacNetworks,SolarisNetworks,WindowsNetworks
@ThreadSafe public class Networks extends java.lang.Object
Network interfaces implementation.
-
Constructor Summary
Constructors Constructor Description Networks() -
Method Summary
Modifier and Type Method Description protected java.net.NetworkInterface[]getNetworkInterfaces()Returns network interfaces that are not Loopback, and have a hardware address.NetworkIF[]getNetworks()Gets the network interfaces on this machine
-
Constructor Details
-
Networks
public Networks()
-
-
Method Details
-
getNetworks
Gets the network interfaces on this machine- Returns:
- An array of
NetworkIFobjects representing the interfaces
-
getNetworkInterfaces
protected java.net.NetworkInterface[] getNetworkInterfaces()Returns network interfaces that are not Loopback, and have a hardware address.- Returns:
- An array of network interfaces
-