Package io.microsphere.util.os.windows
Class WindowsRegistry
- java.lang.Object
-
- io.microsphere.util.os.windows.WindowsRegistry
-
public final class WindowsRegistry extends java.lang.Object
- Since:
- 1.0.0
- Version:
- 1.0.0
- Author:
- Mercy
- See Also:
WindowsRegistry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WindowsRegistry
currentUser()
Get Windows Registry HKEY_CURRENT_USER Singletonvoid
flush(java.lang.String relativePath)
Flush specified registry item in relative pathjava.lang.String
get(java.lang.String relativePath, java.lang.String name)
Get the value of registry item in specified relative pathvoid
remove(java.lang.String relativePath, java.lang.String name)
remove specified registry item in relative pathvoid
set(java.lang.String relativePath, java.lang.String name, java.lang.String value)
Set specified registry item in relative path
-
-
-
Method Detail
-
currentUser
@Nonnull public static WindowsRegistry currentUser() throws java.lang.UnsupportedOperationException
Get Windows Registry HKEY_CURRENT_USER Singleton- Returns:
- non-null return
- Throws:
java.lang.UnsupportedOperationException
- If Non-Windows OS executes current method
-
set
public void set(java.lang.String relativePath, java.lang.String name, java.lang.String value)
Set specified registry item in relative path- Parameters:
relativePath
- relative pathname
- registry item namevalue
- the value of registry item
-
get
@Nullable public java.lang.String get(java.lang.String relativePath, java.lang.String name)
Get the value of registry item in specified relative path- Parameters:
relativePath
- relative pathname
- registry item name- Returns:
null
if not found
-
remove
public void remove(java.lang.String relativePath, java.lang.String name)
remove specified registry item in relative path- Parameters:
relativePath
- relative pathname
- registry item name
-
flush
public void flush(java.lang.String relativePath)
Flush specified registry item in relative path- Parameters:
relativePath
- 路径
-
-