Skipping over the headers in a message using IBM MQ classes for Java

In this example, the skipHeaders() method of MQHeaderIterator positions the message read cursor immediately after the last header.

import com.ibm.mq.MQMessage;
import com.ibm.mq.headers.MQHeaderIterator;
...
MQMessage message = ... // Message received from a queue.
MQHeaderIterator it = new MQHeaderIterator (message);

it.skipHeaders ();
Parent topic: Handling IBM MQ message headers with IBM MQ classes for Java