nevado-jms/src/main/java/org/skyscreamer/nevado/jms/message/NevadoStreamMessage.java
/**
     * Writes an object to the stream message. <p/>
     * <P>
     * This method works only for the objectified primitive object types (<code>Integer</code>,
     * <code>Double</code>, <code>Long</code>&nbsp;...),
     * <code>String</code> objects, and byte arrays.
     *
     * @param value
     *            the Java object to be written
     * @throws JMSException
     *             if the JMS provider fails to write the message due to some
     *             internal error.
     * @throws MessageFormatException
     *             if the object is invalid.
     * @throws MessageNotWriteableException
     *             if the message is in read-only mode.
     */
Writes an object to the stream message. 

This method works only for the objectified primitive object types (Integer,
Double, Long ...),
String objects, and byte arrays.

@param value
the Java object to be written
@throws JMSException
if the JMS provider fails to write the message due to some
internal error.
@throws MessageFormatException
if the object is invalid.
@throws MessageNotWriteableException
if the message is in read-only mode.
Writes an object to the stream message . This method works only for the objectified primitive object types ( Integer Double Long ... ) String objects and byte arrays . @param value the Java object to be written @throws JMSException if the JMS provider fails to write the message due to some internal error . @throws MessageFormatException if the object is invalid . @throws MessageNotWriteableException if the message is in read - only mode .
public void writeObject(Object value) throws JMSException {
        initializeWriting();
        if (value == null) {
            try {
                MarshallingSupport.marshalNull(dataOut);
            } catch (IOException e) {
                String exMessage = "Could not write object: " + e.getMessage();
                _log.error(exMessage, e);
                throw new JMSException(exMessage);
            }
        } else if (value instanceof String) {
            writeString(value.toString());
        } else if (value instanceof Character) {
            writeChar(((Character) value).charValue());
        } else if (value instanceof Boolean) {
            writeBoolean(((Boolean) value).booleanValue());
        } else if (value instanceof Byte) {
            writeByte(((Byte) value).byteValue());
        } else if (value instanceof Short) {
            writeShort(((Short) value).shortValue());
        } else if (value instanceof Integer) {
            writeInt(((Integer) value).intValue());
        } else if (value instanceof Long) {
            writeLong(((Long) value).longValue());
        } else if (value instanceof Float) {
            writeFloat(((Float) value).floatValue());
        } else if (value instanceof Double) {
            writeDouble(((Double) value).doubleValue());
        } else if (value instanceof byte[]) {
            writeBytes((byte[]) value);
        }
    }
public void writeObject ( Object value ) throws JMSException { initializeWriting ( ) ; if ( value == null ) { try { MarshallingSupport . marshalNull ( dataOut ) ; } catch ( IOException e ) { String exMessage = "Could not write object: " + e . getMessage ( ) ; _log . error ( exMessage , e ) ; throw new JMSException ( exMessage ) ; } } else if ( value instanceof String ) { writeString ( value . toString ( ) ) ; } else if ( value instanceof Character ) { writeChar ( ( ( Character ) value ) . charValue ( ) ) ; } else if ( value instanceof Boolean ) { writeBoolean ( ( ( Boolean ) value ) . booleanValue ( ) ) ; } else if ( value instanceof Byte ) { writeByte ( ( ( Byte ) value ) . byteValue ( ) ) ; } else if ( value instanceof Short ) { writeShort ( ( ( Short ) value ) . shortValue ( ) ) ; } else if ( value instanceof Integer ) { writeInt ( ( ( Integer ) value ) . intValue ( ) ) ; } else if ( value instanceof Long ) { writeLong ( ( ( Long ) value ) . longValue ( ) ) ; } else if ( value instanceof Float ) { writeFloat ( ( ( Float ) value ) . floatValue ( ) ) ; } else if ( value instanceof Double ) { writeDouble ( ( ( Double ) value ) . doubleValue ( ) ) ; } else if ( value instanceof byte [ ] ) { writeBytes ( ( byte [ ] ) value ) ; } }
Writes an object to the stream message.
Writes an object to the stream message .