tibemsBytesMsg—Write


Function

Purpose

Write primitive datatypes to the byte stream in the message body.

C Declaration

tibems_status tibemsBytesMsg_WriteBoolean( 
    tibemsBytesMsg message, 
    tibems_bool value ); 
 
tibems_status tibemsBytesMsg_WriteByte( 
    tibemsBytesMsg message, 
    tibems_byte value ); 
 
tibems_status tibemsBytesMsg_WriteChar( 
    tibemsBytesMsg message, 
    tibems_wchar value ); 
 
tibems_status tibemsBytesMsg_WriteDouble( 
    tibemsBytesMsg message, 
    tibems_double value ); 
 
tibems_status tibemsBytesMsg_WriteFloat( 
    tibemsBytesMsg message, 
    tibems_float value ); 
 
tibems_status tibemsBytesMsg_WriteInt( 
    tibemsBytesMsg message, 
    tibems_int value ); 
 
tibems_status tibemsBytesMsg_WriteLong( 
    tibemsBytesMsg message, 
    tibems_long value ); 
 
tibems_status tibemsBytesMsg_WriteShort( 
    tibemsBytesMsg message, 
    tibems_short value ); 
 
tibems_status tibemsBytesMsg_WriteUTF( 
    tibemsBytesMsg message, 
    const char* value ); 

COBOL Call

CALL "tibemsBytesMsg_WriteBoolean" 
 USING BY VALUE message, 
       BY VALUE tibems-Boolean, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteByte" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteChar" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteDouble" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteFloat" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteInt" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteLong" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteShort" 
 USING BY VALUE message, 
       BY VALUE value, 
       RETURNING tibems-status 
END-CALL. 
 
CALL "tibemsBytesMsg_WriteUTF" 
 USING BY VALUE message, 
       BY REFERENCE value, 
       RETURNING tibems-status 
END-CALL. 

message has usage pointer in all calls.

Parameter
Description
message

Write data to the body of this bytes message.

value

Write this value to the message.

Remarks

The JMS specification defines these nine calls to insert data into the byte stream of a BytesMessage.

Each call writes a data value to the stream, and advances the write position so that the next write call appends to the new end of the stream.

Table 13 BytesMessage Write Functions 
Function
# Bytes
Notes
tibemsBytesMsg_WriteBoolean
1
This function writes true as (byte)1, and false as (byte)0.
tibemsBytesMsg_WriteByte
1
 
tibemsBytesMsg_WriteShort
2
 
tibemsBytesMsg_WriteChar
2
This function writes a 2-byte character—high byte first.
tibemsBytesMsg_WriteInt
4
 
tibemsBytesMsg_WriteLong
8
 
tibemsBytesMsg_WriteFloat
4
 
tibemsBytesMsg_WriteDouble
8
 
tibemsBytesMsg_WriteUTF
varies
For information about the UTF-8 format, see File System Safe UCS Transformation Format (FSS_UFT), X/Open Preliminary Specification, X/Open Company Ltd., Document Number: P316.
This information also appears in ISO/IEC 10646, Annex P.

See Also

tibemsBytesMsg_WriteBytes


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