in client/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java [229:320]
public synchronized long writePropertyListPayload(ByteBuffer buffer)
{
if(useEncodedForm())
{
ByteBufferUtils.copyTo(_encodedForm, buffer);
return _encodedForm.remaining();
}
else
{
int propertyListSize = getPropertyListSize();
if ((_propertyFlags & (CONTENT_TYPE_MASK)) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _contentType);
}
if ((_propertyFlags & ENCODING_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _encoding);
}
if ((_propertyFlags & HEADERS_MASK) != 0)
{
EncodingUtils.writeFieldTableBytes(buffer, _headers);
}
if ((_propertyFlags & DELIVERY_MODE_MASK) != 0)
{
buffer.put(_deliveryMode);
}
if ((_propertyFlags & PRIORITY_MASK) != 0)
{
buffer.put(_priority);
}
if ((_propertyFlags & CORRELATION_ID_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _correlationId);
}
if ((_propertyFlags & REPLY_TO_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _replyTo);
}
if ((_propertyFlags & EXPIRATION_MASK) != 0)
{
if (_expiration == 0L)
{
EncodingUtils.writeShortStringBytes(buffer, ZERO_STRING);
}
else
{
EncodingUtils.writeLongAsShortString(buffer, _expiration);
}
}
if ((_propertyFlags & MESSAGE_ID_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _messageId);
}
if ((_propertyFlags & TIMESTAMP_MASK) != 0)
{
buffer.putLong(_timestamp);
}
if ((_propertyFlags & TYPE_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _type);
}
if ((_propertyFlags & USER_ID_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _userId);
}
if ((_propertyFlags & APPLICATION_ID_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _appId);
}
if ((_propertyFlags & CLUSTER_ID_MASK) != 0)
{
EncodingUtils.writeShortStringBytes(buffer, _clusterId);
}
return propertyListSize;
}
}