Class RegistryUtil

java.lang.Object
oshi.util.platform.windows.RegistryUtil

public final class RegistryUtil extends Object
  • 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 root
      path - the registry path
      key - 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 root
      path - the registry path
      key - the registry key
      accessFlag - 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 root
      path - the registry path
      key - the registry key
      accessFlag - 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 root
      path - the registry path
      key - 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 root
      path - the registry path
      key - the registry key
      accessFlag - the access flag
      Returns:
      the registry value as a string