Class RegistryUtil
java.lang.Object
oshi.util.platform.windows.RegistryUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic longgetLongValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key) Returns a registry value as a Long.static longgetLongValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key, int accessFlag) Returns a registry value as a Long.static ObjectgetRegistryValueOrNull(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key, int accessFlag) Gets a registry value or null if not foundstatic StringgetStringValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key) Returns a registry value as a String.static StringgetStringValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key, int accessFlag) Returns a registry value as a String.
-
Method Details
-
getLongValue
public static long getLongValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key) Returns a registry value as a Long. (without access flag) Currently supports String and Integer- Parameters:
root- the registry rootpath- the registry pathkey- the registry key- Returns:
- the registry value as a long
-
getLongValue
public static long getLongValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key, int accessFlag) Returns a registry value as a Long. (with access flag) Currently supports String and Integer- Parameters:
root- the registry rootpath- the registry pathkey- the registry keyaccessFlag- the access flag- Returns:
- the registry value as a long
-
getRegistryValueOrNull
public static Object getRegistryValueOrNull(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key, int accessFlag) Gets a registry value or null if not found- Parameters:
root- the registry rootpath- the registry pathkey- the registry keyaccessFlag- the access flag- Returns:
- the registry value or null
-
getStringValue
public static String getStringValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key) Returns a registry value as a String. (without access flag) Currently supports String and Binary- Parameters:
root- the registry rootpath- the registry pathkey- the registry key- Returns:
- the registry value as a string
-
getStringValue
public static String getStringValue(com.sun.jna.platform.win32.WinReg.HKEY root, String path, String key, int accessFlag) Returns a registry value as a String. (with access flag) Currently supports String and Binary- Parameters:
root- the registry rootpath- the registry pathkey- the registry keyaccessFlag- the access flag- Returns:
- the registry value as a string
-