WebLogic Messaging API Class Library |

# IBytesMessage.WriteObject Method

Writes an object to the bytes message stream.

This method works only for the objectified primitive object types (`int`, `double`, `long` ...), `String` objects, and byte arrays.

void WriteObject(
Object value
);

#### Parameters

Object
  the object to be written; it must not be null

#### Exceptions

Exception Type | Condition
--- | ---
MessageException | if JMS fails to write the message due to some internal error.
MessageFormatException | if the object is of an invalid type.
MessageNotWriteableException | if the message is in read-only mode.
NullReferenceException | if the parameter `value` is null.

#### See Also

IBytesMessage Interface | WebLogic.Messaging Namespace