public class RegistryKey extends Object
| Modifier and Type | Field and Description |
|---|---|
static RegistryKey |
HKEY_CLASSES_ROOT |
static RegistryKey |
HKEY_CURRENT_CONFIG |
static RegistryKey |
HKEY_CURRENT_USER |
static RegistryKey |
HKEY_LOCAL_MACHINE |
static RegistryKey |
HKEY_USERS |
static int |
TYPE_BINARY |
static int |
TYPE_DWORD |
static int |
TYPE_DWORD_BIG_ENDIAN |
static int |
TYPE_DWORD_LITTLE_ENDIAN |
static int |
TYPE_EXPAND_SZ |
static int |
TYPE_LINK |
static int |
TYPE_MULTI_SZ |
static int |
TYPE_NONE |
static int |
TYPE_QWORD |
static int |
TYPE_QWORD_LITTLE_ENDIAN |
static int |
TYPE_SZ |
| Constructor and Description |
|---|
RegistryKey(RegistryKey parent,
String path)
Creates a new RegistryKey object.
|
RegistryKey(RegistryKey parent,
String[] path)
Creates a new RegistryKey object.
|
| Modifier and Type | Method and Description |
|---|---|
RegistryKey |
createSubKey(String name)
Creates a sub key.
|
void |
deleteSubKey(String subKey)
Deletes the sub key.
|
void |
deleteValue(String name)
Deletes the value.
|
boolean |
exists()
Indicates if this registry key exists.
|
String |
get(String path)
Gets a value from a key path.
|
byte[] |
getBinary(String name)
Gets a binary value.
|
int |
getDoubleWord(String name,
int defaultValue)
Gets a DWORD.
|
String[] |
getMultiString(String name)
Gets a value.
|
RegistryKey |
getParent()
Gets the parent key.
|
String[] |
getPath()
Gets the path of the key.
|
static RegistryKey |
getRootKey(String name) |
String |
getString(String name)
Gets a string.
|
RegistryKey |
getSubKey(String name)
Gets a subkey of a particular name (or null).
|
String[] |
getSubKeyNames()
Gets the subkeys for this key.
|
long |
getType(String name)
Gets the type of a value.
|
String[] |
getValueNames()
Gets the values for this key.
|
void |
setBinary(String name,
byte[] value)
Sets a value.
|
void |
setDoubleWord(String name,
int value)
Sets the value.
|
void |
setExpandedString(String name,
String value)
Sets a value.
|
void |
setMultiString(String name,
String[] value)
Sets a multi-string value.
|
void |
setString(String name,
String value)
Sets a value.
|
public static final RegistryKey HKEY_CLASSES_ROOT
public static final RegistryKey HKEY_CURRENT_USER
public static final RegistryKey HKEY_LOCAL_MACHINE
public static final RegistryKey HKEY_USERS
public static final RegistryKey HKEY_CURRENT_CONFIG
public static final int TYPE_NONE
public static final int TYPE_SZ
public static final int TYPE_EXPAND_SZ
public static final int TYPE_BINARY
public static final int TYPE_DWORD
public static final int TYPE_DWORD_LITTLE_ENDIAN
public static final int TYPE_DWORD_BIG_ENDIAN
public static final int TYPE_LINK
public static final int TYPE_MULTI_SZ
public static final int TYPE_QWORD
public static final int TYPE_QWORD_LITTLE_ENDIAN
public RegistryKey(RegistryKey parent, String path)
parent. - path. - public RegistryKey(RegistryKey parent, String[] path)
parent. - path. - public static RegistryKey getRootKey(String name)
public boolean exists()
public String get(String path)
The - path.public String[] getSubKeyNames()
public String[] getValueNames()
public RegistryKey getSubKey(String name)
name. - public RegistryKey createSubKey(String name)
name - public String[] getPath()
public RegistryKey getParent()
public void deleteSubKey(String subKey)
public long getType(String name)
name. - public byte[] getBinary(String name)
name. - public int getDoubleWord(String name, int defaultValue)
name. - public String[] getMultiString(String name)
name. - public void setString(String name, String value)
name. - value. - public void setExpandedString(String name, String value)
name. - value. - public void setBinary(String name, byte[] value)
name. - value. - public void setDoubleWord(String name, int value)
name. - value. - public void setMultiString(String name, String[] value)
name. - value. - public void deleteValue(String name)
Copyright © 2018. All rights reserved.