public class Registry
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Registry.REGISTRY_ROOT_KEY |
| Constructor and Description |
|---|
Registry() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
createKey(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String parent,
java.lang.String name)
Create a new key.
|
static boolean |
deleteKey(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String parent,
java.lang.String name)
Delete a key.
|
static boolean |
deleteValue(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String subKeyName,
java.lang.String name)
Delete a value.
|
static int |
getIntValue(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String subKeyName,
java.lang.String name)
Read an int value.
|
static java.lang.String |
getStringValue(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String subKeyName,
java.lang.String name)
Read a String value.
|
static java.lang.String[] |
getSubKeys(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String parent)
Get all sub keys of a key.
|
static java.util.TreeMap<java.lang.String,java.lang.Object> |
getValues(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String key)
Get all values under a key.
|
static void |
main(java.lang.String[] args)
Testing.
|
static boolean |
setIntValue(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String subKeyName,
java.lang.String name,
int value)
Writes an int value.
|
static boolean |
setStringValue(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String subKeyName,
java.lang.String name,
java.lang.String value)
Writes a String value.
|
static boolean |
valueExists(Registry.REGISTRY_ROOT_KEY rootKey,
java.lang.String subKeyName,
java.lang.String name)
Check for existence of a value.
|
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - argumentsjava.lang.Exception - on errorpublic static java.lang.String getStringValue(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String subKeyName, java.lang.String name) throws java.io.UnsupportedEncodingException
rootKey - root keysubKeyName - key namename - value namejava.io.UnsupportedEncodingException - on errorpublic static int getIntValue(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String subKeyName, java.lang.String name)
rootKey - root keysubKeyName - key namename - value namepublic static boolean deleteValue(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String subKeyName, java.lang.String name)
rootKey - root keysubKeyName - key namename - value namepublic static boolean setStringValue(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String subKeyName, java.lang.String name, java.lang.String value) throws java.io.UnsupportedEncodingException
rootKey - root keysubKeyName - key namename - value namevalue - valuejava.io.UnsupportedEncodingException - on errorpublic static boolean setIntValue(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String subKeyName, java.lang.String name, int value)
rootKey - root keysubKeyName - key namename - value namevalue - valuepublic static boolean valueExists(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String subKeyName, java.lang.String name)
rootKey - root keysubKeyName - key namename - value namepublic static boolean createKey(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String parent, java.lang.String name)
rootKey - root keyparent - name of parent keyname - key namepublic static boolean deleteKey(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String parent, java.lang.String name)
rootKey - root keyparent - name of parent keyname - key namepublic static java.lang.String[] getSubKeys(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String parent)
rootKey - root keyparent - key namepublic static java.util.TreeMap<java.lang.String,java.lang.Object> getValues(Registry.REGISTRY_ROOT_KEY rootKey, java.lang.String key) throws java.io.UnsupportedEncodingException
rootKey - root keykey - jey namejava.io.UnsupportedEncodingException - on error