Copyright © TIBCO Software Inc. All Rights Reserved

> tibemsBytesMsg_Read
> Function
> Purpose
> Read primitive datatypes from the byte stream in the message body.
> C Declaration
> tibems_status tibemsBytesMsg_ReadBoolean(
> tibemsBytesMsg message,
> tibems_bool* value );
> tibems_status tibemsBytesMsg_ReadByte(
> tibemsBytesMsg message,
> tibems_byte* value );
> tibems_status tibemsBytesMsg_ReadChar(
> tibemsBytesMsg message,
> tibems_wchar* value );
> tibems_status tibemsBytesMsg_ReadDouble(
> tibemsBytesMsg message,
> tibems_double* value );
> tibems_status tibemsBytesMsg_ReadFloat(
> tibemsBytesMsg message,
> tibems_float* value );
> tibems_status tibemsBytesMsg_ReadInt(
> tibemsBytesMsg message,
> tibems_int* value );
> tibems_status tibemsBytesMsg_ReadLong(
> tibemsBytesMsg message,
> tibems_long* value );
> tibems_status tibemsBytesMsg_ReadShort(
> tibemsBytesMsg message,
> tibems_short* value );
> tibems_status tibemsBytesMsg_ReadUnsignedByte(
> tibemsBytesMsg message,
> tibems_int* value );
> tibems_status tibemsBytesMsg_ReadUnsignedShort(
> tibemsBytesMsg message,
> tibems_int* value );
> tibems_status tibemsBytesMsg_ReadUTF(
> tibemsBytesMsg message,
> const char** value,
> tibems_int* length );
> COBOL Call
> CALL "tibemsBytesMsg_ReadBoolean"
> USING BY VALUE message,
> BY REFERENCE tibems-Boolean,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadByte"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadChar"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadDouble"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadFloat"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadInt"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadLong"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadShort"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadUnsignedByte"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadUnsignedShort"
> USING BY VALUE message,
> BY REFERENCE value,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsBytesMsg_ReadUTF"
> USING BY VALUE message,
> BY REFERENCE value,
> BY REFERENCE length,
> RETURNING tibems-status
> END-CALL.

> | message has usage pointer in all calls. value has usage pointer in tibemsBytesMsg_ReadUTF.

> Parameters

> Parameter | Description
> message | Read a datum from the body byte stream of this message.
> value | The function stores the datum in this location.
> length | tibemsBytesMsg_ReadUTF reads a UTF-8 string. Since the length of the string cannot be determined in advance, the function stores the actual length in this location.

> Remarks
> The JMS specification defines eleven calls to extract data from the byte stream body of a tibemsBytesMsg.
> Each call reads a unit of data from the stream, and advances the read position so that the next read call gets the next datum.

> Table 8 BytesMessage Read Functions
> Function | # Bytes | Interpret As
> tibemsBytesMsg_ReadBoolean | 1 | tibems_bool
> tibemsBytesMsg_ReadByte | 1 | tibems_byte
> tibemsBytesMsg_ReadUnsignedByte | 1 | tibems_int
> tibemsBytesMsg_ReadShort | 2 | tibems_short
> tibemsBytesMsg_ReadUnsignedShort | 2 | tibems_int
> tibemsBytesMsg_ReadChar | 2 | tibems_wchar
> tibemsBytesMsg_ReadInt | 4 | tibems_int
> tibemsBytesMsg_ReadLong | 8 | tibems_long
> tibemsBytesMsg_ReadFloat | 4 | tibems_float
> tibemsBytesMsg_ReadDouble | 8 | tibems_double
> tibemsBytesMsg_ReadUTF | varies | char* Encoded as UTF.

> See Also
> tibemsBytesMsg_ReadBytes on page 81

Copyright © TIBCO Software Inc. All Rights Reserved