public class RegDWORDValue extends RegistryValue
This class represents a named value of type REG_DWORD,
REG_DWORD_LITTLE_ENDIAN, or REG_DWORD_BIG_ENDIAN.
The type specific data for the value will be an Integer.
RegistryValue,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
int |
getIntValue()
Convenience method to retrieve the data as an
int
primitive data type. |
Integer |
getValue()
Retrieves the type specific form of
this value
which is an Integer. |
int |
refreshData()
This method is used to update the data for
this value
because the data does not update automatically if it was changed. |
int |
setIntValue(int value)
Convenience method to set the data using an
int
primitive data type. |
int |
setValue(Integer value)
Used to set the data of
this value. |
String |
toString()
Retrieve a
String representation of this value. |
clone, compareTo, equals, getByteData, getByteLength, getKey, getName, getValueType, getValueTypeInt, hashCode, setByteData, setValueType, setValueTypeIntpublic Integer getValue()
this value
which is an Integer.
RegistryValue.setValueType(ValueType)
and is no longer of type REG_DWORD, REG_DWORD_LITTLE_ENDIAN, or REG_DWORD_BIG_ENDIAN,
then a RegistryException is thrown.
RegistryException
is also thrown.Integer representing the data.RegistryException - if the type is not REG_DWORD, REG_DWORD_LITTLE_ENDIAN,
or REG_DWORD_BIG_ENDIAN; or if the byte length is not 4.public int getIntValue()
int
primitive data type.int primitive data type representing the data.getValue()public int setValue(Integer value)
this value.
If the type is no longer of type REG_DWORD, REG_DWORD_LITTLE_ENDIAN,
or REG_DWORD_BIG_ENDIAN, then a RegistryException is thrown.value - An Integer representing the new data for the value.RegistryKey.formatErrorMessage(int).RegistryException - if the type is not REG_DWORD, REG_DWORD_LITTLE_ENDIAN,
or REG_DWORD_BIG_ENDIAN.public int setIntValue(int value)
int
primitive data type.value - An int primitive data type representing the new data for the value.RegistryKey.formatErrorMessage(int).setValue(Integer)public int refreshData()
this value
because the data does not update automatically if it was changed.refreshData in class RegistryValueRegistryKey.formatErrorMessage(int).RegistryException - if the type is not REG_DWORD_LITTLE_ENDIAN
or REG_DWORD_BIG_ENDIAN.public String toString()
String representation of this value.toString in class RegistryValueString representation for the value.Copyright © 2011, Yinon Michaeli. All rights reserved.