IBytesMessage
A bytes message is a message whose body comprises a stream of bytes.
- Inheritance hierarchy:
-
IBM.XMS.IPropertyContext | +----IBM.XMS.IMessage | +----IBM.XMS.IBytesMessage
Parent topic: .NET interfaces
.NET properties
- Summary of .NET properties:
-
.NET property Description BodyLength Get the length of the body of the message in bytes when the body of the message is read-only.
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.
Read a boolean
value from the bytes message stream.
Read the next byte
from the bytes message stream as a signed 8-bit integer.
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. The cursor remains at the next position to read in the byte
message stream.
If you specify a null
pointer on input, the method returns no value.
Read the next 2 bytes
from the bytes message stream as a character.
Read the next 8
bytes from the bytes message stream as a double precision floating
point number.
Read the next 4
bytes from the bytes message stream as a floating point number.
Read the next 4 bytes
from the bytes message stream as a signed 32-bit integer.
Read the next 8 bytes
from the bytes message stream as a signed 64-bit integer.
Read the next 2
bytes from the bytes message stream as a signed 16-bit integer.
Read the next
byte from the bytes message stream as an unsigned 8-bit integer.
Read the next
2 bytes from the bytes message stream as an unsigned 16-bit integer.
Read a string, encoded
in UTF-8, from the bytes message stream. Note: Before calling
ReadUTF(), ensure that the cursor of the buffer is pointing to beginning
of the byte message stream.
Put the body of the
message into read-only mode and reposition the cursor at the beginning
of the bytes message stream.
Write a boolean
value to the bytes message stream.
Write a byte to the
bytes message stream.
Write an array of
bytes to the bytes message stream.
Write a partial
array of bytes to the bytes message stream, as defined by the specified
length.
Write a character
to the bytes message stream as 2 bytes, high-order byte first.
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.
Convert a floating
point number to an integer and write the integer to the bytes message
stream as 4 bytes, high-order byte first.
Write an integer to
the bytes message stream as 4 bytes, high-order byte first.
Write a long integer
to the bytes message stream as 8 bytes, high-order byte first.
Write the specified
object into the byte message stream.
Write a short integer
to the bytes message stream as 2 bytes, high-order byte first.
Write a string, encoded
in UTF-8, to the bytes message stream.
The following methods are inherited from the IMessage interface:
The following methods are inherited from the IPropertyContext interface:
BodyLength - Get Body Length
Int64 BodyLength
{
get;
}
Methods
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.
ReadBoolean - Read Boolean Value
Boolean ReadBoolean();
ReadSignedByte - Read Byte
Int16 ReadSignedByte();
ReadBytes - Read Bytes
Int32 ReadBytes(Byte[] array);
Int32 ReadBytes(Byte[] array, Int32 length);
ReadChar - Read Character
Char ReadChar();
ReadDouble - Read Double Precision Floating Point Number
Double ReadDouble();
ReadFloat - Read Floating Point Number
Single ReadFloat();
ReadInt - Read Integer
Int32 ReadInt();
ReadLong - Read Long Integer
Int64 ReadLong();
ReadShort - Read Short Integer
Int16 ReadShort();
ReadByte - Read Unsigned Byte
Byte ReadByte();
ReadUnsignedShort - Read Unsigned Short Integer
Int32 ReadUnsignedShort();
ReadUTF - Read UTF String
String ReadUTF();
Reset - Reset
void Reset();
WriteBoolean - Write Boolean Value
void WriteBoolean(Boolean value);
WriteByte - Write Byte
void WriteByte(Byte value);
void WriteSignedByte(Int16 value);
WriteBytes - Write Bytes
void WriteBytes(Byte[] value);
WriteBytes - Write Partial Bytes Array
void WriteBytes(Byte[] value, int offset, int length);
WriteChar - Write Character
void WriteChar(Char value);
WriteDouble - Write Double Precision Floating Point Number
void WriteDouble(Double value);
WriteFloat - Write Floating Point Number
void WriteFloat(Single value);
WriteInt - Write Integer
void WriteInt(Int32 value);
WriteLong - Write Long Integer
void WriteLong(Int64 value);
WriteObject - Write Object
void WriteObject(Object value);
WriteShort - Write Short Integer
void WriteShort(Int16 value);
WriteUTF - Write UTF String
void WriteUTF(String value);
Inherited properties and methods
The following properties are inherited from the IMessage interface: