Class MacNetworks

java.lang.Object
oshi.hardware.common.AbstractNetworks
oshi.hardware.platform.mac.MacNetworks
All Implemented Interfaces:
Networks

public class MacNetworks
extends AbstractNetworks

MacNetworks class.

  • Constructor Summary

    Constructors 
    Constructor Description
    MacNetworks()  
  • Method Summary

    Modifier and Type Method Description
    NetworkIF[] getNetworks()
    Get network interfaces on this machine
    static boolean updateNetworkStats​(NetworkIF netIF)
    Updates interface network statistics on the given interface.

    Methods inherited from class oshi.hardware.common.AbstractNetworks

    getNetworkInterfaces

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getNetworks

      public NetworkIF[] getNetworks()
      Description copied from interface: Networks
      Get network interfaces on this machine
      Specified by:
      getNetworks in interface Networks
      Overrides:
      getNetworks in class AbstractNetworks
      Returns:
      Array of NetworkIF objects
    • updateNetworkStats

      public static boolean updateNetworkStats​(NetworkIF netIF)
      Updates interface network statistics on the given interface. Statistics include packets and bytes sent and received, and interface speed.
      Parameters:
      netIF - The interface on which to update statistics