code: Response createResponse(final JaxRx impl, final ResourcePath path) {
          final StreamingOutput out = createOutput(impl, path);
  
          // change media type, dependent on WRAP value
          final boolean wrap =
              path.getValue(QueryParameter.WRAP) == null || path.getValue(QueryParameter.WRAP).equals("yes");
          String type = wrap ? MediaType.APPLICATION_XML : MediaType.TEXT_PLAIN;
  
          // overwrite type if METHOD or MEDIA-TYPE parameters are specified
          final String op = path.getValue(QueryParameter.OUTPUT);
          if (op != null) {
              final Scanner sc = new Scanner(op);
              sc.useDelimiter(",");
              while (sc.hasNext()) {
                  final String[] sp = sc.next().split("=", 2);
                  if (sp.length == 1)
                      continue;
                  if (sp[0].equals(METHOD)) {
                      for (final String[] m : METHODS)
                          if (sp[1].equals(m[0]))
                              type = m[1];
                  } else if (sp[0].equals(MEDIATYPE)) {
                      type = sp[1];
                  }
              }
          }
  
          // check validity of media type
          MediaType mt = null;
          try {
              mt = MediaType.valueOf(type);
          } catch (final IllegalArgumentException ex) {
              throw new JaxRxException(400, ex.getMessage());
          }
          return Response.ok(out, mt).build();
  
      }
docs: Returns a result, depending on the query parameters.
  
  @param impl
  implementation
  @param path
  path info
  
  @return parameter map