A stream message is a message whose body comprises a stream of values, where each value has an associated data type. The contents of the body are written and read sequentially.
IBM.XMS.IPropertyContext | +----IBM.XMS.IMessage | +----IBM.XMS.IStreamMessage
When an application reads a value from the message stream, the value can be converted by XMS into another data type. For more information about this form of implicit conversion, see Stream messages.
Method | Description |
---|---|
ReadBoolean | Read a boolean value from the message stream. |
ReadByte | Read a signed 8-bit integer from the message stream. |
ReadBytes | Read an array of bytes from the message stream. |
ReadChar | Read a 2-byte character from the message stream. |
ReadDouble | Read an 8-byte double precision floating point number from the message stream. |
ReadFloat | Read a 4-byte floating point number from the message stream. |
ReadInt | Read a signed 32-bit integer from the message stream. |
ReadLong | Read a signed 64-bit integer from the message stream. |
ReadObject | Read a value from the message stream, and return its data type. |
ReadShort | Read a signed 16-bit integer from the message stream. |
ReadString | Read a string from the message stream. |
Reset | Put the body of the message into read-only mode and reposition the cursor at the beginning of the message stream. |
WriteBoolean | Write a boolean value to the message stream. |
WriteByte | Write a byte to the message stream. |
WriteBytes | Write an array of bytes to the message stream. |
WriteChar | Write a character to the message stream as 2 bytes, high order byte first. |
WriteDouble | Convert a double precision floating point number to a long integer and write the long integer to the message stream as 8 bytes, high order byte first. |
WriteFloat | Convert a floating point number to an integer and write the integer to the message stream as 4 bytes, high order byte first. |
WriteInt | Write an integer to the message stream as 4 bytes, high order byte first. |
WriteLong | Write a long integer to the message stream as 8 bytes, high order byte first. |
WriteObject | Write a value, with a specified data type, to the message stream. |
WriteShort | Write a short integer to the message stream as 2 bytes, high order byte first. |
WriteString | Write a string to the message stream. |
Int32 ReadBytes(Byte[] array);
Read an array of bytes from the message stream.
If the number of bytes in the array is less than or equal to the length of the buffer, the whole array is read into the buffer. If the number of bytes in the array is greater than the length of the buffer, the buffer is filled with part of the array, and an internal cursor marks the position of the next byte to be read. A subsequent call to readBytes() reads bytes from the array starting from the current position of the cursor.
If you specify a null pointer on input, the call skips over the array of bytes without reading it.
If you specify a null pointer on input, the method returns no value.
String ReadString();
Read a string from the message stream. If required, XMS converts the characters in the string into the local code page.
void WriteDouble(Double value);
Convert a double precision floating point number to a long integer and write the long integer to the message stream as 8 bytes, high order byte first.
void WriteFloat(Single value);
Convert a floating point number to an integer and write the integer to the message stream as 4 bytes, high order byte first.
void WriteObject(Object value);
Write a value, with a specified data type, to the message stream.