A bytes message is a message whose body comprises a stream of bytes.
xms::PropertyContext | +----xms::Message | +----xms::BytesMessage
Method | Description |
---|---|
getBodyLength | Get the length of the body of the message when the body of the message is read-only. |
readBoolean | Read a boolean value from the bytes message stream. |
readByte | 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. |
readUnsignedByte | 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. |
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. |
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. |
xmsLONG getBodyLength() const;
Get the length of the body of the message when the body of the message is read-only.
xmsINT readBytes(xmsSBYTE *buffer, const xmsINT bufferLength, xmsINT *returnedLength) const;
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.
xmsDOUBLE readDouble() const;
Read the next 8 bytes from the bytes message stream as a double precision floating point number.
String readUTF() const;
Read a string, encoded in UTF-8, from the bytes message stream. If required, XMS converts the characters in the string from UTF-8 into the local code page.
xmsVOID writeBytes(const xmsSBYTE *value, const xmsINT length);
Write an array of bytes to the bytes message stream.
xmsVOID writeDouble(const xmsDOUBLE 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.
xmsVOID writeFloat(const xmsFLOAT 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.
xmsVOID writeUTF(const String & value);
Write a string, encoded in UTF-8, to the bytes message stream. If required, XMS converts the characters in the string from the local code page into UTF-8.