code: @SuppressWarnings("unchecked")
      public void call(Serializer ser, InputStream is, OutputStream os) 
          throws IOException {
  
          Object obj = null;
          try {
              obj = ser.readMapOrList(is);
          }
          catch (Exception e) {
              String msg = "Unable to deserialize request: " + e.getMessage();
              ser.write(new RpcResponse(null, RpcException.Error.PARSE.exc(msg)).marshal(), os);
              return;
          }
              
          if (obj instanceof List) {
              List list = (List)obj;
              List respList = new ArrayList();
              for (Object o : list) {
                  RpcRequest rpcReq = new RpcRequest((Map)o);
                  respList.add(call(rpcReq).marshal());
              }
              ser.write(respList, os);
          }
          else if (obj instanceof Map) {
              RpcRequest rpcReq = new RpcRequest((Map)obj);
              ser.write(call(rpcReq).marshal(), os);
          }
          else {
              ser.write(new RpcResponse(null, RpcException.Error.INVALID_REQ.exc("Invalid Request")).marshal(), os);
          }
      }
docs: Reads a RpcRequest from the input stream, deserializes it, invokes
  the matching handler method, serializes the result, and writes it to the output stream.
  
  @param ser Serializer to use to decode the request from the input stream, and serialize
  the result to the the output stream
  @param is InputStream to read the request from
  @param os OutputStream to write the response to
  @throws IOException If there is a problem reading or writing to either stream, or if the
  request cannot be deserialized.