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.

Table 1. 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.

Note: The 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 example, a BytesMessage can pass an XML document encoded in a code page that does not match the OpenEdge client's code page.