Skip to content

message.setBytes

Signature: message.setBytes(value)

Returns: void

Sets the message bytes to the value that is passed in.

Note

This method only applies to Binary formatted messages.

Parameters

Type Name Description Default
byte[] value byte[] that will replace the current message model

Example

// Example: Replace the current binary message with new byte[] data.
// This is useful when the message payload is raw binary content,
// such as a PDF, image, or other non-text attachment.

var bytes = qie.readFile("/tmp/updated-report.pdf");

message.setBytes(bytes);