org.tinygroup.weblayer.webcontext.util
类 ServerCookie

java.lang.Object
  继承者 org.tinygroup.weblayer.webcontext.util.ServerCookie

public class ServerCookie
extends Object

这个类从Tomcat 6.0.29的org.apache.tomcat.util.http.ServerCookie改编。

Server-side cookie representation. Allows recycling and uses MessageBytes as low-level representation ( and thus the byte-> char conversion can be delayed until we know the charset ). Tomcat.core uses this recyclable object to represent cookies, and the facade will convert it to the external representation.


字段摘要
static boolean ALWAYS_ADD_EXPIRES
          If set to false, we don't use the IE6/7 Max-Age/Expires work around
static boolean STRICT_SERVLET_COMPLIANCE
          If set to true, we parse cookies according to the servlet spec,
 
构造方法摘要
ServerCookie()
           
 
方法摘要
static boolean alreadyQuoted(String value)
           
static void appendCookieValue(StringBuilder buf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure, boolean isHttpOnly)
           
static boolean containsCTL(String value, int version)
           
static String getCookieHeaderName(int version)
          Return the header name to set the cookie, based on cookie version.
static boolean isToken(String value)
           
static boolean isToken(String value, String literals)
           
static boolean isToken2(String value)
           
static boolean isToken2(String value, String literals)
           
static int maybeQuote2(int version, StringBuilder buf, String value)
          Quotes values using rules that vary depending on Cookie version.
static int maybeQuote2(int version, StringBuilder buf, String value, boolean allowVersionSwitch)
           
static int maybeQuote2(int version, StringBuilder buf, String value, String literals, boolean allowVersionSwitch)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

STRICT_SERVLET_COMPLIANCE

public static final boolean STRICT_SERVLET_COMPLIANCE
If set to true, we parse cookies according to the servlet spec,


ALWAYS_ADD_EXPIRES

public static final boolean ALWAYS_ADD_EXPIRES
If set to false, we don't use the IE6/7 Max-Age/Expires work around

构造方法详细信息

ServerCookie

public ServerCookie()
方法详细信息

isToken

public static boolean isToken(String value)

isToken

public static boolean isToken(String value,
                              String literals)

containsCTL

public static boolean containsCTL(String value,
                                  int version)

isToken2

public static boolean isToken2(String value)

isToken2

public static boolean isToken2(String value,
                               String literals)

getCookieHeaderName

public static String getCookieHeaderName(int version)
Return the header name to set the cookie, based on cookie version.


appendCookieValue

public static void appendCookieValue(StringBuilder buf,
                                     int version,
                                     String name,
                                     String value,
                                     String path,
                                     String domain,
                                     String comment,
                                     int maxAge,
                                     boolean isSecure,
                                     boolean isHttpOnly)

alreadyQuoted

public static boolean alreadyQuoted(String value)

maybeQuote2

public static int maybeQuote2(int version,
                              StringBuilder buf,
                              String value)
Quotes values using rules that vary depending on Cookie version.

参数:
version -
buf -
value -

maybeQuote2

public static int maybeQuote2(int version,
                              StringBuilder buf,
                              String value,
                              boolean allowVersionSwitch)

maybeQuote2

public static int maybeQuote2(int version,
                              StringBuilder buf,
                              String value,
                              String literals,
                              boolean allowVersionSwitch)


Copyright © 2006–2013 开源组织. All rights reserved.