Class RegistryUtil
java.lang.Object
oshi.util.platform.windows.RegistryUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic longgetLongValue(WinReg.HKEY root, String path, String key) Returns a registry value as a Long.static longgetLongValue(WinReg.HKEY root, String path, String key, int accessFlag) Returns a registry value as a Long.static ObjectgetRegistryValueOrNull(WinReg.HKEY root, String path, String key, int accessFlag) Gets a registry value or null if not foundstatic StringgetStringValue(WinReg.HKEY root, String path, String key) Returns a registry value as a String.static StringgetStringValue(WinReg.HKEY root, String path, String key, int accessFlag) Returns a registry value as a String.
-
Method Details
-
getLongValue
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
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(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
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
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
-