org.apache.catalina.connector.Response.getHeaderValues()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.catalina.connector.Response.getHeaderValues方法的一些代码示例,展示了Response.getHeaderValues的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getHeaderValues方法的具体详情如下:
包路径:org.apache.catalina.connector.Response
类名称:Response
方法名:getHeaderValues

Response.getHeaderValues介绍

[英]Return an array of all the header values associated with the specified header name, or an zero-length array if there are no such header values.
[中]返回与指定头名称关联的所有头值的数组,如果没有这样的头值,则返回长度为零的数组。

代码示例

代码示例来源:origin: magro/memcached-session-manager

@Override
public String[] getSetCookieHeaders(final Response response) {
  return response.getHeaderValues("Set-Cookie");
}

代码示例来源:origin: jboss.web/jbossweb

public void addElement(StringBuilder buf, Date date, Request request,
      Response response, long time) {
    if (null != response) {
      String[] values = response.getHeaderValues(header);
      if(values.length > 0) {
        for (int i = 0; i < values.length; i++) {
          String string = values[i];
          buf.append(string) ;
          if(i+1<values.length)
            buf.append(",");
        }
        return ;
      }
    }
    buf.append("-");
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

public void addElement(StringBuilder buf, Date date, Request request,
      Response response, long time) {
    if (null != response) {
      String[] values = response.getHeaderValues(header);
      if(values.length > 0) {
        for (int i = 0; i < values.length; i++) {
          String string = values[i];
          buf.append(string) ;
          if(i+1<values.length)
            buf.append(",");
        }
        return ;
      }
    }
    buf.append("-");
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

public void addElement(StringBuilder buf, Date date, Request request,
      Response response, long time) {
    if (null != response) {
      String[] values = response.getHeaderValues(header);
      if(values.length > 0) {
        StringBuilder buffer = new StringBuilder();
        for (int i = 0; i < values.length; i++) {
          String string = values[i];
          buffer.append(string) ;
          if(i+1<values.length)
            buffer.append(",");
        }
        buf.append(wrap(buffer.toString()));
        return ;
      }
    }
    buf.append("-");
  }
}

代码示例来源:origin: jboss.web/jbossweb

public void addElement(StringBuilder buf, Date date, Request request,
      Response response, long time) {
    if (null != response) {
      String[] values = response.getHeaderValues(header);
      if(values.length > 0) {
        StringBuilder buffer = new StringBuilder();
        for (int i = 0; i < values.length; i++) {
          String string = values[i];
          buffer.append(string) ;
          if(i+1<values.length)
            buffer.append(",");
        }
        buf.append(wrap(buffer.toString()));
        return ;
      }
    }
    buf.append("-");
  }
}

代码示例来源:origin: jboss.web/jbossweb

String rhvalues[] = response.getHeaderValues(rhnames[i]);
for (int j = 0; j < rhvalues.length; j++)
  log.info("            header=" + rhnames[i] + "=" + rhvalues[j]);

代码示例来源:origin: org.jboss.web/jbossweb

String rhvalues[] = response.getHeaderValues(rhnames[i]);
for (int j = 0; j < rhvalues.length; j++)
  log.info("            header=" + rhnames[i] + "=" + rhvalues[j]);

代码示例来源:origin: tomcat/catalina-optional

String rhvalues[] = response.getHeaderValues(rhnames[i]);
for (int j = 0; j < rhvalues.length; j++)
  log.info("            header=" + rhnames[i] + "=" + rhvalues[j]);

相关文章

Response类方法