com.ibm.cics.server

Class DataHolder

  • java.lang.Object
    • com.ibm.cics.server.DataHolder
  • All Implemented Interfaces:
    IHolder


    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.

    Since CICS TS version:
    1.3
    Since package version:
    1.0
    • Field Summary

      Fields 
      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 Summary

      Constructors 
      Constructor and Description
      DataHolder()
      Constructs a DataHolder without a value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        @Deprecated
        public 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.
        The array of bytes comprising the item.
        Since CICS TS version:
        1.3
        Since package version:
        1.0
    • Constructor Detail

      • DataHolder

        public DataHolder()
        Constructs a DataHolder without a value.
        Since CICS TS version:
        1.3
        Since package version:
        1.0
    • Method Detail

      • getValue

        public byte[] getValue()
        Description copied from interface: IHolder
        Returns the raw byte array from the IHolder
        Specified by:
        getValue in interface IHolder
        Returns:
        - the raw byte value stored in the IHolder
        See Also:
        IHolder.getValue()
        Since CICS TS version:
        5.1
        Since package version:
        1.401.0
      • getStringValue

        public java.lang.String getStringValue()
        Description copied from interface: IHolder
        Returns 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:
        getStringValue in interface IHolder
        Returns:
        - a String representation of the byte-array in the CICS LOCALCCSID.
        See Also:
        IHolder.getStringValue()
        Since CICS TS version:
        5.1
        Since package version:
        1.401.0
      • setValue

        public void setValue(byte[] value)
        Set a value into the DataHolder
        Parameters:
        value - the value to set
        Since CICS TS version:
        5.1
        Since package version:
        1.401.0
      • setStringValue

        public void setStringValue(java.lang.String value)
        Set a value into the DataHolder
        Parameters:
        value - the value to set. The text is converted into the LOCALCCSID encoding.
        Since CICS TS version:
        5.1
        Since package version:
        1.401.0