byte[] result = new byte[10000];
int pos = 0;
final AMQPDescribedTypeRegistry typeRegistry = AMQPDescribedTypeRegistry.newInstance();
AMQFrame frame = AMQFrame.createAMQFrame((short) 0, (FrameBody) vals[0]);
FrameWriter writer = new FrameWriter(typeRegistry);
/*for(Object obj : vals)
{
final AMQPDescribedTypeRegistry typeRegistry = AMQPDescribedTypeRegistry.newInstance();
ValueWriter writer = typeRegistry.getValueWriter(obj);
*/
int count;
ByteBuffer buf = ByteBuffer.wrap(result, pos, size);
do
{
writer.writeToBuffer(buf);
pos = buf.position();
buf = ByteBuffer.wrap(result, pos, size);
if(!writer.isComplete())
{
count = 3;
}
} while (!writer.isComplete());
/*
}
*/