getBodyLength

 

public long getBodyLength() throws JMSException, 
            MessageNotReadableException;

Gets the number of bytes of the message body when the message is in read-only mode. The value returned can be used to allocate a byte array. The value returned is the entire length of the message body, regardless of where the pointer for reading the message is currently located.

Returns

  • number of bytes in the message

Exceptions

  • JMSException - with reasons

    • MQJMS_EXCEPTION_MESSAGE_NOT_READABLE

    • MQJMS_EXCEPTION_RESOURCE_ALLOCATION


uj25840_