protected static Buffer methodCallToBuffer(final MethodCall call, Marshaller marshaller) throws Exception { Object[] args=call.args(); int estimated_size=64; if(args != null) for(Object arg: args) estimated_size+=marshaller != null? marshaller.estimatedSize(arg) : (arg == null? 2 : 50); ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(estimated_size, true); call.writeTo(out, marshaller); return out.getBuffer(); }
call.args(line, local_addr);
protected static Buffer methodCallToBuffer(final MethodCall call, Marshaller marshaller) throws Exception { Object[] args=call.args(); int estimated_size=64; if(args != null) for(Object arg: args) estimated_size+=marshaller != null? marshaller.estimatedSize(arg) : (arg == null? 2 : 50); ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(estimated_size, true); call.writeTo(out, marshaller); return out.getBuffer(); }
call.args(line, local_addr);