try
{
ByteBufferInputStream bbis = new ByteBufferInputStream(buf);
DataInputStream dais = new DataInputStream(bbis);
int size = EncodingUtils.readInteger(dais);
ContentHeaderBody chb = ContentHeaderBody.createFromBuffer(dais, size);
final AMQShortString exchange = EncodingUtils.readAMQShortString(dais);
final AMQShortString routingKey = EncodingUtils.readAMQShortString(dais);
final byte flags = EncodingUtils.readByte(dais);
long arrivalTime = EncodingUtils.readLong(dais);