WebLogic Messaging API Class Library

IStreamMessage.ReadObject Method 

Reads an object from the stream message.

This method can be used to return, an object that has been written to the stream with the equivalent WriteObject method call, or its equivalent primitive writetype method.

An attempt to call ReadObject to read a byte field value into a new byte[] object before the full value of the byte field has been read will throw a MessageFormatException.

object ReadObject();

Return Value

a object from the stream message

Exceptions

Exception TypeCondition
MessageExceptionif JMS fails to read the message due to some internal error.
MessageEOFExceptionif unexpected end of message stream has been reached.
MessageFormatExceptionif this type conversion is invalid.
MessageNotReadableExceptionif the message is in write-only mode.

See Also

IStreamMessage Interface | WebLogic.Messaging Namespace | ReadBytes