In API detail of getTotalMessageLength and getMessageLength listed as follows:


public int getTotalMessageLength()

The total number of bytes in the message as stored on the message queue from which this message was retrieved (or attempted to be retrieved). When an MQQueue.get() method fails with a message-truncated error code, this method tells you the total size of the message on the queue.


public int getMessageLength

Throws IOException.

The number of bytes of message data in this MQMessage object.

1)It seems that getTotalMessageLength is more powerfull than getMessageLength.So thought getTotalMessageLength can completely take place of getMessageLength.

I am right?

2)Does getTotalMessageLength take EOF as end message to count the length of message??

thanks a lot.