|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ovanttasks.ovnative.win32.Registry
public class Registry
Registry accesses the Windows Registry. Read/write/test/create/delete are supported for both data and subtrees.
Nested Class Summary | |
---|---|
class |
Registry.SubKeyIterator
|
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_PERFORMANCE_NLSTEXT
|
static int |
HKEY_PERFORMANCE_TEXT
|
static int |
HKEY_USERS
|
static int |
KEY_ALL_ACCESS
|
static int |
KEY_CREATE_LINK
|
static int |
KEY_CREATE_SUB_KEY
|
static int |
KEY_ENUMERATE_SUB_KEYS
|
static int |
KEY_EXECUTE
|
static int |
KEY_NOTIFY
|
static int |
KEY_QUERY_VALUE
|
static int |
KEY_READ
|
static int |
KEY_SET_VALUE
|
static int |
KEY_WRITE
|
static int |
REG_BINARY
Free form binary |
static int |
REG_DWORD
32-bit number |
static int |
REG_DWORD_BIG_ENDIAN
32-bit number |
static int |
REG_DWORD_LITTLE_ENDIAN
32-bit number (same as REG_DWORD) |
static int |
REG_EXPAND_SZ
Unicode nul terminated string (with environment variable references) |
static int |
REG_FULL_RESOURCE_DESCRIPTOR
Resource list in the hardware description TODO implement |
static int |
REG_LINK
Symbolic Link (unicode) |
static int |
REG_MULTI_SZ
Multiple Unicode strings |
static int |
REG_NONE
No value type |
static int |
REG_QWORD
64-bitnumber TODO implement |
static int |
REG_QWORD_LITTLE_ENDIAN
64-bit number (same as REG_QWORD) TODO implement |
static int |
REG_RESOURCE_LIST
Resource list in the resource mapped to struct _CM_RESOURCE_LIST from winddk.h TODO implement |
static int |
REG_RESOURCE_REQUIREMENTS_LIST
64-bitnumber TODO implement |
static int |
REG_SZ
Unicode null terminated string |
Constructor Summary | |
---|---|
Registry(int hKey)
|
|
Registry(int hKey,
String subKey)
|
|
Registry(Registry reg,
String subKey)
|
Method Summary | |
---|---|
boolean |
canOpenWith(int flags)
|
void |
create()
|
Registry |
createSubKey(String subKeyName)
Create a new subKey as child of this subKey. |
void |
delete()
|
void |
deleteSubKey(String subKeyName)
Deletes the subKey if it exists |
void |
deleteValue(String name)
|
boolean |
equals(Object other)
|
boolean |
exists()
Deprecated. |
BigDecimal |
getBigDecimalValue(String name)
|
BigInteger |
getBigIntegerValue(String name)
|
boolean |
getBooleanValue(String name)
|
byte[] |
getByteArrayValue(String name)
|
byte |
getByteValue(String name)
|
double |
getDoubleValue(String name)
internal storage format is Double.toString |
String |
getExpandableString(String name,
boolean doExpand)
|
float |
getFloatValue(String name)
internal storage format Float.toString |
int |
getHKey()
|
static String |
getHKeyName(int hKey)
|
int |
getIntValue(String name)
|
long |
getLongValue(String name)
internal storage format Long.toString |
String[] |
getMultiStringValue(String name)
|
short |
getShortValue(String name)
|
String |
getStringValue(String name)
if it is an REG_EXPAND_SZ should it be expanded?? |
String |
getSubKey()
|
int |
getValueType(String name)
|
static String |
getValueTypeName(int valueType)
|
int |
hashCode()
|
boolean |
hasSubKey(String name)
|
boolean |
hasSubKeys()
|
boolean |
hasValue(String name)
|
boolean |
hasValues()
|
Iterator<Registry> |
iterator()
|
Registry |
openSubKey(String subKeyName)
Opens a child subKey of this subKey. |
static int |
parseHKeyName(String name)
|
static int |
parseValueTypeName(String name)
|
void |
setExpandableString(String name,
String value)
|
void |
setValue(String name,
BigDecimal value)
|
void |
setValue(String name,
BigInteger value)
|
void |
setValue(String name,
boolean value)
|
void |
setValue(String name,
byte value)
|
void |
setValue(String name,
byte[] value)
|
void |
setValue(String name,
double value)
|
void |
setValue(String name,
float value)
|
void |
setValue(String name,
int value)
|
void |
setValue(String name,
long value)
|
void |
setValue(String name,
short value)
|
void |
setValue(String name,
String value)
|
void |
setValue(String name,
String[] value)
|
void |
setValue(String name,
String value,
int valueType)
|
String[] |
subKeyNames()
|
Iterator<Registry> |
subKeys()
|
String |
toString()
|
String[] |
valueNames()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int KEY_QUERY_VALUE
public static final int KEY_SET_VALUE
public static final int KEY_CREATE_SUB_KEY
public static final int KEY_ENUMERATE_SUB_KEYS
public static final int KEY_NOTIFY
public static final int KEY_CREATE_LINK
public static final int KEY_WRITE
public static final int KEY_EXECUTE
public static final int KEY_READ
public static final int KEY_ALL_ACCESS
public static final int HKEY_CLASSES_ROOT
public static final int HKEY_CURRENT_USER
public static final int HKEY_LOCAL_MACHINE
public static final int HKEY_USERS
public static final int HKEY_PERFORMANCE_DATA
public static final int HKEY_PERFORMANCE_TEXT
public static final int HKEY_PERFORMANCE_NLSTEXT
public static final int HKEY_CURRENT_CONFIG
public static final int HKEY_DYN_DATA
public static final int REG_NONE
public static final int REG_SZ
public static final int REG_EXPAND_SZ
public static final int REG_BINARY
public static final int REG_DWORD
public static final int REG_DWORD_LITTLE_ENDIAN
public static final int REG_DWORD_BIG_ENDIAN
public static final int REG_LINK
public static final int REG_MULTI_SZ
public static final int REG_RESOURCE_LIST
public static final int REG_FULL_RESOURCE_DESCRIPTOR
public static final int REG_RESOURCE_REQUIREMENTS_LIST
public static final int REG_QWORD
public static final int REG_QWORD_LITTLE_ENDIAN
Constructor Detail |
---|
public Registry(int hKey)
public Registry(int hKey, String subKey)
public Registry(Registry reg, String subKey)
Method Detail |
---|
public static String getHKeyName(int hKey)
public static String getValueTypeName(int valueType)
public static int parseHKeyName(String name)
public static int parseValueTypeName(String name)
public void create() throws Win32Exception
Win32Exception
public Registry createSubKey(String subKeyName) throws Win32Exception
subKeyName
- the name of the subkey to create
Win32Exception
public void delete() throws Win32Exception
Win32Exception
public void deleteSubKey(String subKeyName)
subKeyName
- public void deleteValue(String name) throws Win32Exception
Win32Exception
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
@Deprecated public boolean exists()
public boolean canOpenWith(int flags)
public BigDecimal getBigDecimalValue(String name)
public BigInteger getBigIntegerValue(String name)
public boolean getBooleanValue(String name) throws Win32Exception
Win32Exception
public byte[] getByteArrayValue(String name)
public byte getByteValue(String name)
public double getDoubleValue(String name)
name
-
public String getExpandableString(String name, boolean doExpand) throws Win32Exception
Win32Exception
public float getFloatValue(String name) throws Win32Exception
name
-
Win32Exception
public int getHKey()
public int getIntValue(String name)
public long getLongValue(String name)
name
-
public short getShortValue(String name)
public String getStringValue(String name)
name
-
public String[] getMultiStringValue(String name)
public String getSubKey()
public int getValueType(String name)
public boolean hasSubKey(String name)
public boolean hasSubKeys() throws Win32Exception
Win32Exception
public boolean hasValue(String name) throws Win32Exception
Win32Exception
public boolean hasValues() throws Win32Exception
Win32Exception
public Registry openSubKey(String subKeyName) throws Win32Exception
canOpenWith(String, int, int)
and the appropirate flag
from the KEY_* constants. the Key might exists, but you have no right to
read the key.
subKeyName
- the name of the subkey to open
Win32Exception
public void setExpandableString(String name, String value) throws Win32Exception
Win32Exception
public void setValue(String name, BigDecimal value)
public void setValue(String name, BigInteger value)
public void setValue(String name, boolean value) throws Win32Exception
Win32Exception
public void setValue(String name, byte value) throws Win32Exception
Win32Exception
public void setValue(String name, byte[] value) throws Win32Exception
Win32Exception
public void setValue(String name, double value) throws Win32Exception
Win32Exception
public void setValue(String name, float value) throws Win32Exception
Win32Exception
public void setValue(String name, int value) throws Win32Exception
Win32Exception
public void setValue(String name, long value) throws Win32Exception
Win32Exception
public void setValue(String name, short value) throws Win32Exception
Win32Exception
public void setValue(String name, String value) throws Win32Exception
Win32Exception
public void setValue(String name, String[] value) throws Win32Exception
Win32Exception
public void setValue(String name, String value, int valueType) throws Win32Exception
Win32Exception
public String[] subKeyNames()
public Iterator<Registry> subKeys()
public String toString()
toString
in class Object
public String[] valueNames()
public Iterator<Registry> iterator()
iterator
in interface Iterable<Registry>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |