BytesMessage—Write


Method

Declaration

void WriteBoolean(bool value); 
void WriteByte(byte value); 
void WriteShort(short value); 
void WriteChar(char value); 
void WriteInt(int value); 
void WriteLong(long value); 
void WriteFloat(float value); 
void WriteDouble(double value); 
void WriteUTF(string value); 
void WriteObject(Object value); 

Purpose

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

Parameter
Description
value

Write this value to the message.

Remarks

The JMS specification defines these ten methods 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 7 BytesMessage Write Methods (Sheet 1 of 2)
Method
# Bytes
Notes
WriteBoolean
1
 
WriteByte
1
 
WriteShort
2
 
WriteChar
2
 
WriteInt
4
 
WriteLong
8
 
WriteFloat
4
 
WriteDouble
8
 
WriteUTF
varies
Encoded as UTF-8
WriteObject
varies
Converts an object to a primitive value (if possible), and writes that value to the byte stream.

See Also

BytesMessage.WriteBytes


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