@@ -0,0 +1,748 @@
+/**%0A * Copyright (C) 2010-2011, FuseSource Corp.  All rights reserved.%0A *%0A *     http://fusesource.com%0A *%0A * The software in this package is published under the terms of the%0A * CDDL license a copy of which has been included with this distribution%0A * in the license.txt file.%0A */%0A%0Apackage org.fusesource.fabric.apollo.amqp.codec;%0A%0Aimport org.fusesource.fabric.apollo.amqp.codec.interfaces.AMQPType;%0Aimport org.fusesource.hawtbuf.Buffer;%0Aimport org.fusesource.hawtbuf.DataByteArrayOutputStream;%0A%0A/**%0A *%0A */%0Apublic class Codec %7B%0A%0A    public static Buffer toBuffer(AMQPType type) throws Exception %7B%0A        DataByteArrayOutputStream out = new DataByteArrayOutputStream((int)type.size());%0A        type.write(out);%0A        return out.toBuffer();%0A    %7D%0A%7D%0A

Add simple helper function to encode AMQP types