}
}
private void encodeBody()
{
JNIData data = new JNIData(Proton.pn_message_body(_impl));
data.clear();
if(_body instanceof Data)
{
Proton.pn_message_set_inferred(_impl, true);
data.putBinary(((Data) _body).getValue());
}
else if(_body instanceof AmqpSequence)
{
Proton.pn_message_set_inferred(_impl, true);
data.putJavaList(((AmqpSequence)_body).getValue());
}
else if(_body instanceof AmqpValue)
{
Proton.pn_message_set_inferred(_impl, false);
data.putObject(((AmqpValue) _body).getValue());
}
}