//Creates a buffer to serialize/deserialize with
InputStream in = new ByteArrayInputStream(new byte[1]);
mbuf_in = new PushbackInputStream(in,10000); //supports 10k msg size
mbuf_out = new ByteArrayOutputStream();
mbuf_transport = new TIOStreamTransport(mbuf_in, mbuf_out);
mbuf_protocol = new TBinaryProtocol(mbuf_transport);
}