Retrieves a bytes part and returns the content type as a CHARACTER string.

Note: The JMS providers other than SonicMQ do not support this method.

Syntax

FUNCTION getBytesPartByID RETURNS CHARACTER
  (INPUT contentID AS INTEGER, OUTPUT memPtr AS MEMPTR).

Applies to

Message objects

Notes

  • Before calling this function, call SET-SIZE to free any memory allocated by the MEMPTR.
  • The bytes part does not undergo any code-page conversion. If it consists of text data, it is encoded in UTF-8. To encode it differently, either convert the code page manually or use one of the getTextPartBy... functions.

See also

createMultipartMessage procedure, addBytesPart procedure, addMessagePart procedure, addTextPart procedure, isMessagePart function, getPartCount function, getMessagePartByID function, getMessagePartByIndex function, writeBytesFromRaw procedure, readBytesToRaw procedure, setMemptr procedure, getMemptr function

For more information, see the MultipartMessage and the MultiPartMessage example.