beautypg.com

Setbytesvalue, Getbytesvalue, Getbytesvaluebyindex – HP NonStop G-Series User Manual

Page 302

background image

Returns The string value of the data element or the default value.

Usage Get the string value of a data element associated with a name and an index. Most output
data, except carray (octets) data type, are automatically converted to String. If there is a
type-cast error, the default value will be returned.

setBytesValue

setBytesValue(String name, byte value[])

name

The name of the data element.

value

The byte value for the data element.

Usage This method is same as setBytesByIndexValue(name,0,value) for the octet value.

getBytesValue

byte[] getBytesValue(String name, byte defval[])

name

The name of the data element

defval

The default value if the data element does not exist.

Returns The octet value of the data element or the default value.

Usage Get the octet value of a data element associated with a name. If an output field has carray
(octets) data type, the data remains as byte[]. The caller must use this method to retrieve the
data. If there is a type-cast error, the default value will be returned.

getBytesValueByIndex

byte[] getBytesValueByIndex(String name, int index,
byte defval[])

name

The name of the data element

index

The index of the data element, starting from 0.