{
private final AMQPDescribedTypeRegistry _typeRegistry = AMQPDescribedTypeRegistry.newInstance();
public MessageMetaData_1_0 createMetaData(ByteBuffer buf)
{
ValueHandler valueHandler = new ValueHandler(_typeRegistry);
ArrayList<Section> sections = new ArrayList<Section>(3);
ArrayList<ByteBuffer> encodedSections = new ArrayList<ByteBuffer>(3);
while(buf.hasRemaining())
{
try
{
ByteBuffer encodedBuf = buf.duplicate();
sections.add((Section) valueHandler.parse(buf));
encodedBuf.limit(buf.position());
encodedSections.add(encodedBuf);
}
catch (AmqpErrorException e)