Package com.iizix.os
Class HardwareInfo
- java.lang.Object
- com.iizix.os.HardwareInfo
public class HardwareInfo extends java.lang.Object
Hardware information class using "OSHI".- Author:
- Christopher Mindus
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
get(HardwareIdentication info, boolean fresh, boolean update, java.lang.String... ipAddresses)
Gets the information as specified by the hardware information.static HardwareInfo
getInstance()
Gets the instance.java.util.LinkedHashMap<java.lang.String,java.lang.String>
getProperties()
Gets the map of all hardware properties.java.lang.String
toString()
Outputs the info as a string.
Method Detail
getInstance
public static HardwareInfo getInstance()
Gets the instance.
getProperties
public java.util.LinkedHashMap<java.lang.String,java.lang.String> getProperties()
Gets the map of all hardware properties.- Returns:
- The linked hash map.
toString
public java.lang.String toString()
Outputs the info as a string.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A debug string.
get
public java.lang.String get(HardwareIdentication info, boolean fresh, boolean update, java.lang.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".