code: @Override
  	public void writeObject(Object value) throws JMSException
      {
          if (value == null)
              throw new NullPointerException(); // [JMS Spec]
          
          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 String)
              writeUTF((String)value);
          else
          if (value instanceof byte[])
              writeBytes((byte[])value);
          else
              throw new MessageFormatException("Unsupported property value type : "+value.getClass().getName());
      }
docs: /*
  (non-Javadoc)
  @see javax.jms.BytesMessage#writeObject(java.lang.Object)