|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.coi.tools.os.win.RegDataContainer
Data container for Windows registry values. Windows registry values can contain different data types. It is not possible to map they all to one Java type. Therefore this class contains the different container types.
Field Summary | |
private byte[] |
binData
|
private long |
dwordData
|
private java.lang.String[] |
multiStringData
|
static int |
REG_BINARY
|
static int |
REG_DWORD
|
static int |
REG_EXPAND_SZ
|
static int |
REG_LINK
|
static int |
REG_MULTI_SZ
|
static int |
REG_NONE
|
static int |
REG_SZ
|
private static long |
serialVersionUID
|
private java.lang.String |
stringData
|
private int |
type
|
private static int[] |
VALID_TYPES
|
Constructor Summary | |
RegDataContainer()
Default constructor. |
|
RegDataContainer(byte[] data)
Creates a RegDataContainer for type REG_BINARY with the given data |
|
RegDataContainer(int type)
Creates a RegDataContainer for a special type The data self is not set. |
|
RegDataContainer(long data)
Creates a RegDataContainer for type REG_DWORD with the given data |
|
RegDataContainer(java.lang.String data)
Creates a RegDataContainer for type REG_SZ with the given data |
|
RegDataContainer(java.lang.String[] data)
Creates a RegDataContainer for type REG_MULTI_SZ with the given data |
Method Summary | |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object anObject)
|
byte[] |
getBinData()
Returns the binary data of this container. |
java.lang.Object |
getDataAsObject()
Returns the contained data depending to the type. |
long |
getDwordData()
Returns the dword data of this container. |
java.lang.String[] |
getMultiStringData()
Returns the multi string data as string array of this container. |
java.lang.String |
getStringData()
Returns the string data of this container. |
int |
getType()
Returns the data type handled by this object. |
boolean |
isValidType(int type)
Verifies whether the given int represents a valid type or not. |
void |
setBinData(byte[] bytes)
Sets the binary data to the given byte array. |
void |
setDwordData(long i)
Sets the dword data to the given value. |
void |
setMultiStringData(java.lang.String[] strings)
Sets the multi string data to the given string array. |
void |
setStringData(java.lang.String string)
Sets the string data to the given value. |
void |
setType(int i)
Sets the type. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
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_LINK
public static final int REG_MULTI_SZ
private static final int[] VALID_TYPES
private long dwordData
private java.lang.String stringData
private java.lang.String[] multiStringData
private byte[] binData
private int type
Constructor Detail |
public RegDataContainer()
public RegDataContainer(int type) throws java.lang.IllegalArgumentException
type
-
java.lang.IllegalArgumentException
- if the type is not validpublic RegDataContainer(long data)
data
- data which should be used with this objectpublic RegDataContainer(java.lang.String data)
data
- data which should be used with this objectpublic RegDataContainer(java.lang.String[] data)
data
- data which should be used with this objectpublic RegDataContainer(byte[] data)
data
- data which should be used with this objectMethod Detail |
public byte[] getBinData()
public long getDwordData()
public java.lang.String[] getMultiStringData()
public java.lang.String getStringData()
public int getType()
public void setBinData(byte[] bytes)
bytes
- data to be setpublic void setDwordData(long i)
i
- data to be setpublic void setMultiStringData(java.lang.String[] strings)
strings
- data to be setpublic void setStringData(java.lang.String string)
string
- data to be setpublic void setType(int i)
i
- type to be setpublic boolean isValidType(int type)
type
- value to be verified
public java.lang.Object getDataAsObject()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object anObject)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |