net.proxy.sunproxy
Class WinRegistry

java.lang.Object
  extended by net.proxy.sunproxy.WinRegistry

public class WinRegistry
extends java.lang.Object

A simple cover class for the Windows registry. The API is similar to the Windows C registry API.


Field Summary
static int HKEY_CLASSES_ROOT
           
static int HKEY_CURRENT_CONFIG
           
static int HKEY_CURRENT_USER
           
static int HKEY_DYN_DATA
           
static int HKEY_LOCAL_MACHINE
           
static int HKEY_PERFORMANCE_DATA
           
static int HKEY_USERS
           
 
Constructor Summary
WinRegistry()
           
 
Method Summary
static boolean deleteKey(int hKey, java.lang.String path)
           
static boolean doesSubKeyExist(int hKey, java.lang.String path)
          Returns true if the subkey path exists in hkey.
static boolean doReboot()
           
static java.lang.Object get(int hKey, java.lang.String path, java.lang.String name)
           
static java.lang.Integer getInteger(int hKey, java.lang.String path, java.lang.String name)
           
static java.lang.String getString(int hKey, java.lang.String path, java.lang.String name)
           
static java.lang.String getWindowsDirectory()
          [TBD] This should move to another class.
static boolean setStringValue(int hKey, java.lang.String path, java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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_PERFORMANCE_DATA

public static final int HKEY_PERFORMANCE_DATA
See Also:
Constant Field Values

HKEY_CURRENT_CONFIG

public static final int HKEY_CURRENT_CONFIG
See Also:
Constant Field Values

HKEY_DYN_DATA

public static final int HKEY_DYN_DATA
See Also:
Constant Field Values
Constructor Detail

WinRegistry

public WinRegistry()
Method Detail

getWindowsDirectory

public static java.lang.String getWindowsDirectory()
[TBD] This should move to another class.


get

public static java.lang.Object get(int hKey,
                                   java.lang.String path,
                                   java.lang.String name)

getString

public static java.lang.String getString(int hKey,
                                         java.lang.String path,
                                         java.lang.String name)

getInteger

public static java.lang.Integer getInteger(int hKey,
                                           java.lang.String path,
                                           java.lang.String name)

setStringValue

public static boolean setStringValue(int hKey,
                                     java.lang.String path,
                                     java.lang.String name,
                                     java.lang.String value)

doesSubKeyExist

public static boolean doesSubKeyExist(int hKey,
                                      java.lang.String path)
Returns true if the subkey path exists in hkey.


deleteKey

public static boolean deleteKey(int hKey,
                                java.lang.String path)

doReboot

public static boolean doReboot()