public void write(final TBase<?, ?> base) throws TException { final TBaseStreamNode node = new TBaseStreamNode(transport); node.setClassName(base.getClass().getName()); node.setBeginPosition(transport.getBufferPosition()); final TProtocol protocol = protocolFactory.getProtocol(transport); base.write(protocol); node.setEndPosition(transport.getBufferPosition()); nodes.add(node); }
public void clear() throws TException { nodes.clear(); transport.flush(); }