net.sf.cfactory.windows.registry
Class Registry
java.lang.Object
|
+--net.sf.cfactory.windows.registry.Registry
- public class Registry
- extends java.lang.Object
Simple methods for accessing the registry on windows.
- Author:
- Stig Tanggaard
Method Summary |
void |
addKey(int rootKey,
java.lang.String key,
java.lang.String newvalue)
Method for adding a key, assumes the key doesnt exists allready,
but if it does, it overrides the value of the existing key, ie
acts like editkey.
|
void |
editKey(int rootKey,
java.lang.String key,
java.lang.String newvalue)
Method for editing a registry key. |
static void |
main(java.lang.String[] args)
|
java.lang.Object |
readKey(int rootkey,
java.lang.String key)
Maybe this should return an array Object[] since if I understand
correct, a key in the registry is down to the 'folder like icons'
ie, not including the actual key/value pair. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HKEY_CLASSES_ROOT
public static final int HKEY_CLASSES_ROOT
- See Also:
- Constant Field Values
HKEY_CURRENT_USER
public static final int HKEY_CURRENT_USER
- See Also:
- Constant Field Values
HKEY_LOCAL_MACHINE
public static final int HKEY_LOCAL_MACHINE
- See Also:
- Constant Field Values
HKEY_USERS
public static final int HKEY_USERS
- See Also:
- Constant Field Values
HKEY_CURRENT_CONFIG
public static final int HKEY_CURRENT_CONFIG
- See Also:
- Constant Field Values
Registry
public Registry()
editKey
public void editKey(int rootKey,
java.lang.String key,
java.lang.String newvalue)
- Method for editing a registry key. This assumes is allready
exists, and if not, it returns without creating a new key.
The key argument is the key part AFTER the HKEY_CURRENT_USER.
- Parameters:
key
- the registrykey,newvalue
-
addKey
public void addKey(int rootKey,
java.lang.String key,
java.lang.String newvalue)
- Method for adding a key, assumes the key doesnt exists allready,
but if it does, it overrides the value of the existing key, ie
acts like editkey.
Method addKey.
- Parameters:
key
- newvalue
-
readKey
public java.lang.Object readKey(int rootkey,
java.lang.String key)
- Maybe this should return an array Object[] since if I understand
correct, a key in the registry is down to the 'folder like icons'
ie, not including the actual key/value pair.
main
public static void main(java.lang.String[] args)