Package com.ibm.cics.server
Class DataHolder
java.lang.Object
com.ibm.cics.server.DataHolder
- All Implemented Interfaces:
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.This instance variable can be accessed using getters getValue()
and getStringValue() and setters setValue(byte[]) and setStringValue(String)
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.
- Since CICS TS version:
- 1.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 IHoldervoidsetStringValue(String valueToSet) Set a value into the DataHoldervoidsetValue(byte[] value) Set a value into the DataHoldertoString()
-
Constructor Details
-
DataHolder
public DataHolder()Constructs aDataHolderwithout a value.- Since CICS TS version:
- 1.3
-
-
Method Details
-
getValue
public byte[] getValue()Description copied from interface:IHolderReturns the raw byte array from the IHolder -
getStringValue
Description copied from interface:IHolderReturns a String derived from the data in the IHolder, assuming that the data is encoded in the LOCALCCSID. The behavior of this method when the bytes are not valid in the LOCALCCSID encoding is unspecified.- Specified by:
getStringValuein interfaceIHolder- Returns:
- - a String representation of the byte-array in the CICS LOCALCCSID.
- See Also:
- Since CICS TS version:
- 5.1
-
setValue
public void setValue(byte[] value) Set a value into the DataHolder- Parameters:
value- the value to set- Since CICS TS version:
- 5.1
-
setStringValue
Set a value into the DataHolder- Parameters:
valueToSet- the value to set. The text is converted into the LOCALCCSID encoding.- Since CICS TS version:
- 5.1
-
toString
-