public class DataHolder extends java.lang.Object implements IHolder
This class holds an array of bytes that is the data read from a TDQ.
The actual data is an instance variable of type byte[]
with the name value
.
The reason for this extra holder class is that the data is returned from a method and the return value of the method is used to indicate the number of items in the TDQ.
Modifier and Type | Field and Description |
---|---|
byte[] |
value
Deprecated.
- Direct access to this field will not be allowed in a future release
This will be made private, use the getter methods instead.
|
Constructor and Description |
---|
DataHolder()
Constructs a
DataHolder without a value. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getStringValue()
Returns a String derived from the data in the IHolder, assuming
that the data is encoded in the LOCALCCSID.
|
byte[] |
getValue()
Returns the raw byte array from the IHolder
|
void |
setStringValue(java.lang.String value)
Set a value into the DataHolder
|
void |
setValue(byte[] value)
Set a value into the DataHolder
|
@Deprecated public byte[] value
public DataHolder()
DataHolder
without a value.public byte[] getValue()
IHolder
getValue
in interface IHolder
IHolder.getValue()
public java.lang.String getStringValue()
IHolder
getStringValue
in interface IHolder
IHolder.getStringValue()
public void setValue(byte[] value)
value
- the value to setpublic void setStringValue(java.lang.String value)
value
- the value to set. The text is converted into the LOCALCCSID encoding.