BytesMessage
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
A BytesMessage is a message type that contains
an uninterpreted stream of bytes.This message type allows the passing of
data "as is" without any interpretation by the ABL–JMS API or the
JMS server.
The following table lists the methods for handling bytes messages.
| Create method | Populate method | Access method |
|---|---|---|
| createBytesMessage procedure | setMemptr procedure writeBytesFromRaw procedure reset procedure clearBody procedure | readBytesToRaw procedure getMemptr function endOfStream function getBytesCount function |
To write data to a BytesMessage, an application uses RAW or MEMPTR variables
with writeBytesFromRaw procedure or setMemptr
procedure. To read data, it uses readBytesToRaw
procedure or getMemptr function.
RAW data type has a 32K
size limit. To bypass this limit, an application uses the writeBytesFromRaw
procedure and the readBytesToRaw procedure repeatedly.
The MEMPTR data type does not have a 32K limit.
To access MEMPTR bytes data, an application uses
the setMemptr procedure and the getMemptr function.For an example, see "Publishing, subscribing, and receiving an XML document in a BytesMessage" topic in the OpenEdge Development: Messaging and ESB guide.
For example, a BytesMessage can pass an XML document encoded in a code page that does not match the OpenEdge client's code
page.
For more information, see "XML code page encoding" topic in the OpenEdge Development: Messaging and ESB guide. For an example, see "Publishing, receiving, and parsing an XMLMessage" topic in the OpenEdge Development: Messaging and ESB guide.