| java.lang.Object org.netbeans.installer.utils.system.windows.WindowsRegistry
WindowsRegistry | public class WindowsRegistry (Code) | | author: Dmitry Lipin author: Kirill Sorokin |
Method Summary | |
public boolean | canModifyKey(int section, String key) Checks whether the specified key exists and can be modified in the registry. | public String | constructKey(String parent, String child) | public int | countSubKeys(int section, String key) Get the number of the subkeys of the specified key. | public int | countValues(int section, String key) Get the number of the values of the specified key. | public void | createKey(int section, String key) Create the new key in the registry. | public void | createKey(int section, String parent, String child) Create the new key in the registry. | public void | deleteKey(int section, String key) Delete the specified key exists in the registry. | public void | deleteKey(int section, String parent, String child) Delete the specified key exists in the registry. | public void | deleteValue(int section, String key, String name) Delete the specified value exists in the registry. | public int | get32BitValue(int section, String key, String name) Get integer value. | public byte[] | getBinaryValue(int section, String key, String name) Get binary value. | public String | getKeyName(String key) | public String | getKeyParent(String key) | public String[] | getMultiStringValue(int section, String key, String name) | public String | getStringValue(int section, String key, String name) | public String | getStringValue(int section, String key, String name, boolean expand) Get string value. | public String[] | getSubKeyNames(int section, String key) Get the array of subkey names of the specified key. | public String[] | getSubKeys(int section, String key) | public String[] | getValueNames(int section, String key) Get the array of values names of the specified key. | public int | getValueType(int section, String key, String name) Returns the type of the value. | public boolean | keyEmpty(int section, String key) Checks whether the specified value exists in the registry. | public boolean | keyExists(int section, String key) Checks whether the specified key exists in the registry (can be read). | public boolean | keyExists(int section, String parent, String child) | public void | set32BitValue(int section, String key, String name, int value) Set REG_DWORD value. | public void | setAdditionalValues(int section, String key, Map<String, Object> values) | public void | setBinaryValue(int section, String key, String name, byte[] value) Set binary (REG_BINARY) value. | public void | setMultiStringValue(int section, String key, String name, String[] value) Set REG_MULTI_SZ value. | public void | setNoneValue(int section, String key, String name, byte... bytes) | public void | setStringValue(int section, String key, String name, Object value) | public void | setStringValue(int section, String key, String name, String value) | public void | setStringValue(int section, String key, String name, String value, boolean expandable) Set string value. | public boolean | valueExists(int section, String key, String name) Checks whether the specified value exists in the registry. |
HKCR | final public static int HKCR(Code) | | |
HKCU | final public static int HKCU(Code) | | |
HKEY_CLASSES_ROOT | final public static int HKEY_CLASSES_ROOT(Code) | | |
HKEY_CURRENT_CONFIG | final public static int HKEY_CURRENT_CONFIG(Code) | | |
HKEY_CURRENT_USER | final public static int HKEY_CURRENT_USER(Code) | | |
HKEY_DYN_DATA | final public static int HKEY_DYN_DATA(Code) | | |
HKEY_LOCAL_MACHINE | final public static int HKEY_LOCAL_MACHINE(Code) | | |
HKEY_PERFORMANCE_DATA | final public static int HKEY_PERFORMANCE_DATA(Code) | | |
HKEY_PERFORMANCE_NLSTEXT | final public static int HKEY_PERFORMANCE_NLSTEXT(Code) | | |
HKEY_PERFORMANCE_TEXT | final public static int HKEY_PERFORMANCE_TEXT(Code) | | |
HKEY_USERS | final public static int HKEY_USERS(Code) | | |
HKLM | final public static int HKLM(Code) | | |
REG_BINARY | final public static int REG_BINARY(Code) | | |
REG_DWORD | final public static int REG_DWORD(Code) | | |
REG_DWORD_BIG_ENDIAN | final public static int REG_DWORD_BIG_ENDIAN(Code) | | |
REG_DWORD_LITTLE_ENDIAN | final public static int REG_DWORD_LITTLE_ENDIAN(Code) | | |
REG_EXPAND_SZ | final public static int REG_EXPAND_SZ(Code) | | |
REG_FULL_RESOURCE_DESCRIPTOR | final public static int REG_FULL_RESOURCE_DESCRIPTOR(Code) | | |
REG_LINK | final public static int REG_LINK(Code) | | |
REG_MULTI_SZ | final public static int REG_MULTI_SZ(Code) | | |
REG_NONE | final public static int REG_NONE(Code) | | |
REG_QWORD | final public static int REG_QWORD(Code) | | |
REG_QWORD_LITTLE_ENDIAN | final public static int REG_QWORD_LITTLE_ENDIAN(Code) | | |
REG_RESOURCE_LIST | final public static int REG_RESOURCE_LIST(Code) | | |
REG_RESOURCE_REQUIREMENTS_LIST | final public static int REG_RESOURCE_REQUIREMENTS_LIST(Code) | | |
REG_SZ | final public static int REG_SZ(Code) | | |
WindowsRegistry | public WindowsRegistry()(Code) | | |
canModifyKey | public boolean canModifyKey(int section, String key) throws NativeException(Code) | | Checks whether the specified key exists and can be modified in the registry.
Parameters: section - The section of the registry Parameters: key - The specified key true if the specified key can exists and can be modified, false otherwise |
countSubKeys | public int countSubKeys(int section, String key) throws NativeException(Code) | | Get the number of the subkeys of the specified key.
Parameters: section - The section of the registry Parameters: key - The specified key If the key doesn`t exist or can`t be accessed then return -1. Otherwise return the number of subkeys |
countValues | public int countValues(int section, String key) throws NativeException(Code) | | Get the number of the values of the specified key.
Parameters: section - The section of the registry Parameters: key - The specified key If the key doesn`t exist or can`t be accessed then return -1. Otherwise return the number of values |
createKey | public void createKey(int section, String key) throws NativeException(Code) | | Create the new key in the registry.
Parameters: section - The section of the registry Parameters: key - The specified key true if the key was successfully created, false otherwise |
createKey | public void createKey(int section, String parent, String child) throws NativeException(Code) | | Create the new key in the registry.
Parameters: section - The section of the registry Parameters: parent - key The specified parent key Parameters: parent - key The specified child key true if the key was successfully created, false otherwise |
deleteKey | public void deleteKey(int section, String key) throws NativeException(Code) | | Delete the specified key exists in the registry. Note that if the key
contains subkeys then it would not be deleted.
Parameters: section - The section of the registry Parameters: key - The specified key true if the specified key was deleted, false otherwise |
deleteKey | public void deleteKey(int section, String parent, String child) throws NativeException(Code) | | Delete the specified key exists in the registry.
Parameters: section - The section of the registry Parameters: parentKey - The specified parent key Parameters: childKey - The specified child key true if the specified key was deleted, false otherwise |
deleteValue | public void deleteValue(int section, String key, String name) throws NativeException(Code) | | Delete the specified value exists in the registry.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: value - The specified value true if the specified value was deleted, false otherwise |
get32BitValue | public int get32BitValue(int section, String key, String name) throws NativeException(Code) | | Get integer value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value The value of the name, -1 in case of any error |
getBinaryValue | public byte[] getBinaryValue(int section, String key, String name) throws NativeException(Code) | | Get binary value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value The binary value of the name, null in case of any error |
getMultiStringValue | public String[] getMultiStringValue(int section, String key, String name) throws NativeException(Code) | | Get the array of strings of the specified value
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value The multri-string value of the name, null in case of any error |
getStringValue | public String getStringValue(int section, String key, String name, boolean expand) throws NativeException(Code) | | Get string value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value Parameters: expandable - If expandable is true andthe type of the value is REG_EXPAND_SZ the value would be expanded The value of the name, null in case of any error |
getSubKeyNames | public String[] getSubKeyNames(int section, String key) throws NativeException(Code) | | Get the array of subkey names of the specified key.
Parameters: section - The section of the registry Parameters: key - The specified key If the key doesn`t exist or can`t be accessed then return null Otherwise return the array of subkey names |
getValueNames | public String[] getValueNames(int section, String key) throws NativeException(Code) | | Get the array of values names of the specified key.
Parameters: section - The section of the registry Parameters: key - The specified key If the key doesn`t exist or can`t be accessed then return null Otherwise return the array of value names |
getValueType | public int getValueType(int section, String key, String name) throws NativeException(Code) | | Returns the type of the value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: value - The specified value The possible values are:
REG_NONE
REG_SZ
REG_EXPAND_SZ
REG_BINARY
REG_DWORD =REG_DWORD_LITTLE_ENDIAN
REG_DWORD_BIG_ENDIAN
REG_LINK
REG_MULTI_SZ
REG_RESOURCE_LIST
REG_FULL_RESOURCE_DESCRIPTOR
REG_RESOURCE_REQUIREMENTS_LIST
REG_QWORD =REG_QWORD_LITTLE_ENDIAN |
keyEmpty | public boolean keyEmpty(int section, String key) throws NativeException(Code) | | Checks whether the specified value exists in the registry.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: value - The specified value true if the specified value exists, false otherwise |
keyExists | public boolean keyExists(int section, String key) throws NativeException(Code) | | Checks whether the specified key exists in the registry (can be read).
Parameters: section - The section of the registry Parameters: key - The specified key true if the specified key exists (can be read), false otherwise |
set32BitValue | public void set32BitValue(int section, String key, String name, int value) throws NativeException(Code) | | Set REG_DWORD value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value Parameters: value - The specified value of the name true if the value was successfully set false otherwise |
setBinaryValue | public void setBinaryValue(int section, String key, String name, byte[] value) throws NativeException(Code) | | Set binary (REG_BINARY) value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value Parameters: value - The specified value of the name true if the value was successfully set false otherwise |
setMultiStringValue | public void setMultiStringValue(int section, String key, String name, String[] value) throws NativeException(Code) | | Set REG_MULTI_SZ value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value Parameters: value - The specified value of the name true if the value was successfully set false otherwise |
setNoneValue | public void setNoneValue(int section, String key, String name, byte... bytes) throws NativeException(Code) | | Set new value of REG_NONE type
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: value - The specified value |
setStringValue | public void setStringValue(int section, String key, String name, String value) throws NativeException(Code) | | Parameters: section - Parameters: key - Parameters: name - Parameters: value - |
setStringValue | public void setStringValue(int section, String key, String name, String value, boolean expandable) throws NativeException(Code) | | Set string value.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: name - The specified value Parameters: value - The specified value of the name Parameters: expandable - If expandable is true then the type would beREG_EXPAND_SZ or REG_SZ otherwise true if the value was successfully set false otherwise |
valueExists | public boolean valueExists(int section, String key, String name) throws NativeException(Code) | | Checks whether the specified value exists in the registry.
Parameters: section - The section of the registry Parameters: key - The specified key Parameters: value - The specified value true if the specified value exists, false otherwise |
|
|