beautypg.com

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

Page 312

background image

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.

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 and an index. 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.

setBytesValueByIndex

setBytesValueByIndex(String name, int index, byte value[])

name

The name of the data element.