public class FileRegistryKey extends RegistryKeyObject
dontCacheData, emptyValuesList, name, path, root
GET_INDEXES, GET_INDEXES_AS_LONGS, OPTION_READ_32_BIT_VALUES_ONLY, OPTION_READ_64_BIT_VALUES_ONLY, SORT_CASE_SENSITIVE, SORT_DESCENDING, SORT_DONT_SORT
Modifier | Constructor and Description |
---|---|
|
FileRegistryKey(File dir) |
protected |
FileRegistryKey(String name,
String fullPath,
RegistryKeyObject root,
int options) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
createKey(String fullPath)
Override this to create the data that represents a key.
|
boolean |
deleteValue(String name)
Delete a value with the specified name.
|
protected boolean |
doDelete() |
static boolean |
fileRegistryAvailable() |
protected RegistryKeyObject |
getNew(String name,
String fullPath,
RegistryKeyObject root,
int options)
You must override this method.
|
protected String[] |
getUnsortedKeyNames() |
Object |
getValue(int index,
StringBuffer valueName)
Get a value at the specified index.
|
Object |
getValue(String valueName)
This returns either a String or a byte array, or an Integer (representing a 32-bit value)
or a StringBuffer for an expanding String or null.
|
int |
getValueCount() |
boolean |
keyExists()
Return true if the key already exists.
|
protected void |
keyNamesChanged()
This is called when the key names have been changed.
|
boolean |
setExpandingString(String name,
String value) |
boolean |
setValue(String name,
byte[] value)
Set a binary data value.
|
boolean |
setValue(String name,
int value)
Set a 32-bit data value in the default little-endian format.
|
boolean |
setValue(String name,
String value)
Set a String value.
|
amRoot, changeOptions, clearKeyNames, createKey, deleteKey, getFullKeyPath, getKeyName, getOrCreate, getParentKey, getRootKey, getSubKey, getSubKey, getSubKeyCount, getSubKeys
protected FileRegistryKey(String name, String fullPath, RegistryKeyObject root, int options)
public FileRegistryKey(File dir)
public static boolean fileRegistryAvailable()
protected boolean createKey(String fullPath)
createKey
in class RegistryKeyObject
fullPath
- the full path of the key.protected void keyNamesChanged()
keyNamesChanged
in class RegistryKeyObject
public boolean keyExists()
IRegistryKey
keyExists
in interface IRegistryKey
keyExists
in class RegistryKeyObject
protected String[] getUnsortedKeyNames()
getUnsortedKeyNames
in class RegistryKeyObject
public boolean setExpandingString(String name, String value)
setExpandingString
in interface IRegistryKey
setExpandingString
in class RegistryKeyObject
public boolean setValue(String name, String value)
IRegistryKey
setValue
in interface IRegistryKey
setValue
in class RegistryKeyObject
public boolean setValue(String name, byte[] value)
IRegistryKey
setValue
in interface IRegistryKey
setValue
in class RegistryKeyObject
public boolean setValue(String name, int value)
IRegistryKey
setValue
in interface IRegistryKey
setValue
in class RegistryKeyObject
protected RegistryKeyObject getNew(String name, String fullPath, RegistryKeyObject root, int options)
getNew
in class RegistryKeyObject
name
- the name to display. If this is null the displayed name
defaults to the last section of the path.fullPath
- the full path but not starting with a leading '\'root
- the root for the key.public Object getValue(String valueName)
IRegistryKey
getValue
in interface IRegistryKey
getValue
in class RegistryKeyObject
public Object getValue(int index, StringBuffer valueName) throws IndexOutOfBoundsException
IRegistryKey
getValue
in interface IRegistryKey
getValue
in class RegistryKeyObject
index
- the index of the value.valueName
- a StringBuffer to hold the value name.IndexOutOfBoundsException
- if the index is too high.public boolean deleteValue(String name)
IRegistryKey
deleteValue
in interface IRegistryKey
deleteValue
in class RegistryKeyObject
public int getValueCount()
getValueCount
in interface IRegistryKey
getValueCount
in class RegistryKeyObject
protected boolean doDelete()
doDelete
in class RegistryKeyObject