Decodes (parses) an MQHeader instance from a message. The message context object carries the
format, encoding and CCSID associated with the current position in the message or byte stream.
The operation of an MQHeaderFactory to fulfil this method is essentially:
- Identify the header type that occurs next in the message. This may be known by the factory
directly, and associated with the format; or the MQHeaderFactory may need to peek at the
message content to detect the type.
- Having identified the correct type, instantiate an MQHeader instance of that type.
- Invoke the header object's read method on the message.
- Optionally, update the format, encoding and characterSet members of the message context
object.
- Return the header instance.
This method may return null if no more headers are present or this MQHeaderFactory cannot
identify a header at the current position in the message.