Package com.iizix.os

Class HardwareInfo

java.lang.Object
com.iizix.os.HardwareInfo

public class HardwareInfo extends Object
Hardware information class using "OSHI".
Author:
Christopher Mindus
  • Method Details

    • getInstance

      public static HardwareInfo getInstance()
      Gets the instance.
    • getProperties

      public LinkedHashMap<String,String> getProperties()
      Gets the map of all hardware properties.
      Returns:
      The linked hash map.
    • toString

      public String toString()
      Outputs the info as a string.
      Overrides:
      toString in class Object
      Returns:
      A debug string.
    • get

      public String get(HardwareIdentication info, boolean fresh, boolean update, String... ipAddresses)
      Gets the information as specified by the hardware information.
      Parameters:
      info - The hardware information to return.
      fresh - Flag indicating the information must be fresh (in case hardware has changed).
      update - Flag to update refreshed information.
      ipAddresses - Only these addresses will be included. If the list is empty, all are included.

      This list of addresses is only used for for:
      - HardwareIdentication.HostAddressesIPv4,
      - HardwareIdentication.HostNamesWithDomain, and
      - HardwareIdentication.HostNames.

      Note: the flags "fresh" and "update" are not used if you specify a specific list of IP addresses.

      Returns:
      The string formatted according to specification of the "info".