Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » http » [javadoc | source]
org.apache.tomcat.util.http
public class: ServerCookie [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.http.ServerCookie

All Implemented Interfaces:
    Serializable

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.
Field Summary
public static final  boolean STRICT_SERVLET_COMPLIANCE    If set to true, we parse cookies according to the servlet spec, 
public static final  boolean ALWAYS_ADD_EXPIRES    If set to false, we don't use the IE6/7 Max-Age/Expires work around 
Constructor:
 public ServerCookie() 
Method from org.apache.tomcat.util.http.ServerCookie Summary:
alreadyQuoted,   appendCookieValue,   checkName,   containsCTL,   getComment,   getCookieHeaderName,   getCookieHeaderName,   getDomain,   getMaxAge,   getName,   getPath,   getSecure,   getValue,   getVersion,   isToken,   isToken,   isToken2,   isToken2,   maybeQuote,   maybeQuote2,   maybeQuote2,   maybeQuote2,   recycle,   setMaxAge,   setSecure,   setVersion,   toString,   unescapeDoubleQuotes
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.http.ServerCookie Detail:
 public static boolean alreadyQuoted(String value) 
 public static  void appendCookieValue(StringBuffer headerBuf,
    int version,
    String name,
    String value,
    String path,
    String domain,
    String comment,
    int maxAge,
    boolean isSecure,
    boolean isHttpOnly) 
 public static boolean checkName(String name) 
Deprecated! - - Not used

 public static boolean containsCTL(String value,
    int version) 
 public MessageBytes getComment() 
 public String getCookieHeaderName() 
    Return the header name to set the cookie, based on cookie version.
 public static String getCookieHeaderName(int version) 
    Return the header name to set the cookie, based on cookie version.
 public MessageBytes getDomain() 
 public int getMaxAge() 
 public MessageBytes getName() 
 public MessageBytes getPath() 
 public boolean getSecure() 
 public MessageBytes getValue() 
 public int getVersion() 
 public static boolean isToken(String value) 
 public static boolean isToken(String value,
    String literals) 
 public static boolean isToken2(String value) 
 public static boolean isToken2(String value,
    String literals) 
 public static  void maybeQuote(int version,
    StringBuffer buf,
    String value) 
Deprecated! - - Not used

 public static int maybeQuote2(int version,
    StringBuffer buf,
    String value) 
    Quotes values using rules that vary depending on Cookie version.
 public static int maybeQuote2(int version,
    StringBuffer buf,
    String value,
    boolean allowVersionSwitch) 
 public static int maybeQuote2(int version,
    StringBuffer buf,
    String value,
    String literals,
    boolean allowVersionSwitch) 
 public  void recycle() 
 public  void setMaxAge(int expiry) 
 public  void setSecure(boolean flag) 
 public  void setVersion(int v) 
 public String toString() 
 public static  void unescapeDoubleQuotes(ByteChunk bc) 
    Unescapes any double quotes in the given cookie value.