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

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

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

Request.convertCookies介绍

[英]Converts the parsed cookies (parsing the Cookie headers first if they have not been parsed) into Cookie objects.
[中]将已解析的Cookie(如果尚未解析Cookie头,则先解析Cookie头)转换为Cookie对象。

代码示例

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Return the set of Cookies received with this Request. Triggers parsing of
 * the Cookie HTTP headers followed by conversion to Cookie objects if this
 * has not already been performed.
 *
 * @return the array of cookies
 */
@Override
public Cookie[] getCookies() {
  if (!cookiesConverted) {
    convertCookies();
  }
  return cookies;
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Return the set of Cookies received with this Request. Triggers parsing of
 * the Cookie HTTP headers followed by conversion to Cookie objects if this
 * has not already been performed.
 *
 * @return the array of cookies
 */
@Override
public Cookie[] getCookies() {
  if (!cookiesConverted) {
    convertCookies();
  }
  return cookies;
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Add a Cookie to the set of Cookies associated with this Request.
 *
 * @param cookie The new cookie
 */
public void addCookie(Cookie cookie) {
  if (!cookiesConverted) {
    convertCookies();
  }
  int size = 0;
  if (cookies != null) {
    size = cookies.length;
  }
  Cookie[] newCookies = new Cookie[size + 1];
  if (cookies != null) {
    System.arraycopy(cookies, 0, newCookies, 0, size);
  }
  newCookies[size] = cookie;
  cookies = newCookies;
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Add a Cookie to the set of Cookies associated with this Request.
 *
 * @param cookie The new cookie
 */
public void addCookie(Cookie cookie) {
  if (!cookiesConverted) {
    convertCookies();
  }
  int size = 0;
  if (cookies != null) {
    size = cookies.length;
  }
  Cookie[] newCookies = new Cookie[size + 1];
  if (cookies != null) {
    System.arraycopy(cookies, 0, newCookies, 0, size);
  }
  newCookies[size] = cookie;
  cookies = newCookies;
}

相关文章

Request类方法