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.

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 12 BytesMessage Read Functions 
Function
# Bytes
Interpret As
tibemsBytesMsg_ReadBoolean
1
tibemsBytesMsg_ReadByte
1
tibemsBytesMsg_ReadUnsignedByte
1
tibemsBytesMsg_ReadShort
2
tibemsBytesMsg_ReadUnsignedShort
2
tibemsBytesMsg_ReadChar
2
tibemsBytesMsg_ReadInt
4
tibemsBytesMsg_ReadLong
8
tibemsBytesMsg_ReadFloat
4
tibemsBytesMsg_ReadDouble
8
tibemsBytesMsg_ReadUTF
varies
char*
Encoded as UTF.

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.

See Also

tibemsBytesMsg_ReadBytes


TIBCO Enterprise Message Service™ C and COBOL Reference
System Release 4.3, February 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com