protected TIOStreamTransport outTransport, inTransport;
protected TProtocol outProtocol, inProtocol;
private void init(TProtocolFactory inFactory, TProtocolFactory outFactory) throws Exception {
outTransport = new TIOStreamTransport(bos);
inTransport = new TIOStreamTransport(bis);
outProtocol = outFactory.getProtocol(outTransport);
inProtocol = inFactory.getProtocol(inTransport);
}