A bytes message is a message whose body comprises a stream of bytes.
IBM.XMS.IPropertyContext | +----IBM.XMS.IMessage | +----IBM.XMS.IBytesMessage
.NET property | Description |
---|---|
BodyLength | Get the length of the body of the message in bytes when the body of the message is read-only. |
Int64 BodyLength { get; }
Get the length of the body of the message in bytes when the body of the message is read-only.
The value returned is the length of the whole body regardless of where the cursor for reading the message is currently positioned.
Method | Description |
---|---|
ReadBoolean | Read a boolean value from the bytes message stream. |
ReadSignedByte | Read the next byte from the bytes message stream as a signed 8-bit integer. |
ReadBytes | Read an array of bytes from the bytes message stream starting from the current position of the cursor. |
ReadChar | Read the next 2 bytes from the bytes message stream as a character. |
ReadDouble | Read the next 8 bytes from the bytes message stream as a double precision floating point number. |
ReadFloat | Read the next 4 bytes from the bytes message stream as a floating point number. |
ReadInt | Read the next 4 bytes from the bytes message stream as a signed 32-bit integer. |
ReadLong | Read the next 8 bytes from the bytes message stream as a signed 64-bit integer. |
ReadShort | Read the next 2 bytes from the bytes message stream as a signed 16-bit integer. |
ReadByte | Read the next byte from the bytes message stream as an unsigned 8-bit integer. |
ReadUnsignedShort | Read the next 2 bytes from the bytes message stream as an unsigned 16-bit integer. |
ReadUTF | Read a string, encoded in UTF-8, from the bytes message stream. |
Reset | Put the body of the message into read-only mode and reposition the cursor at the beginning of the bytes message stream. |
WriteBoolean | Write a boolean value to the bytes message stream. |
WriteByte | Write a byte to the bytes message stream. |
WriteBytes | Write an array of bytes to the bytes message stream. |
WriteBytes | Write a partial array of bytes to the bytes message stream, as defined by the specified length. |
WriteChar | Write a character to the bytes 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 bytes message stream as 8 bytes, high order byte first. |
WriteFloat | Convert a floating point number to an integer and write the integer to the bytes message stream as 4 bytes, high order byte first. |
WriteInt | Write an integer to the bytes message stream as 4 bytes, high order byte first. |
WriteLong | Write a long integer to the bytes message stream as 8 bytes, high order byte first. |
WriteObject | Write the specified object into the byte message stream. |
WriteShort | Write a short integer to the bytes message stream as 2 bytes, high order byte first. |
WriteUTF | Write a string, encoded in UTF-8, to the bytes message stream. |
Int32 ReadBytes(Byte[] array); Int32 ReadBytes(Byte[] array, Int32 length);
Read an array of bytes from the bytes message stream starting from the current position of the cursor.
If you specify a null pointer on input, the method skips over the bytes without reading them. If the number of bytes remaining to be read from the stream before the call is greater than or equal to the length of the buffer, the number of bytes skipped is equal to the length of the buffer. Otherwise, all the remaining bytes are skipped.
If you specify a null pointer on input, the method returns no value.
void WriteBytes(Byte[] value, int offset, int length);
Write a partial array of bytes to the bytes message stream, as defined by the specified length.
void WriteDouble(Double value);
Convert a double precision floating point number to a long integer and write the long integer to the bytes 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 bytes message stream as 4 bytes, high order byte first.