beautypg.com

Getvalue, Getbytesvalue -- by index, Getbytesvalue – HP NonStop G-Series User Manual

Page 288

background image

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 typecast
error, the default value will be returned.

getValue

String getValue(String name, String defaultValue)

name

The name of the data element.

defaultValue

The default value if the element does not exist.

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

Usage This method is same as getValue(name,0,defaultValue).

getBytesValue -- by index

byte[] getBytesValue(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 typecast error, the default value will be returned.

getBytesValue

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

name

The name of the data element.

defval