|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.http.ServerCookie
public class 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.
Field Summary | |
---|---|
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, |
Constructor Summary | |
---|---|
ServerCookie()
|
Method Summary | |
---|---|
static boolean |
alreadyQuoted(java.lang.String value)
|
static void |
appendCookieValue(java.lang.StringBuffer headerBuf,
int version,
java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
java.lang.String comment,
int maxAge,
boolean isSecure,
boolean isHttpOnly)
|
static boolean |
checkName(java.lang.String name)
Deprecated. - Not used |
static boolean |
containsCTL(java.lang.String value,
int version)
|
MessageBytes |
getComment()
|
java.lang.String |
getCookieHeaderName()
Return the header name to set the cookie, based on cookie version. |
static java.lang.String |
getCookieHeaderName(int version)
Return the header name to set the cookie, based on cookie version. |
MessageBytes |
getDomain()
|
int |
getMaxAge()
|
MessageBytes |
getName()
|
MessageBytes |
getPath()
|
boolean |
getSecure()
|
MessageBytes |
getValue()
|
int |
getVersion()
|
static boolean |
isToken(java.lang.String value)
|
static boolean |
isToken(java.lang.String value,
java.lang.String literals)
|
static boolean |
isToken2(java.lang.String value)
|
static boolean |
isToken2(java.lang.String value,
java.lang.String literals)
|
static void |
maybeQuote(int version,
java.lang.StringBuffer buf,
java.lang.String value)
Deprecated. - Not used |
static int |
maybeQuote2(int version,
java.lang.StringBuffer buf,
java.lang.String value)
Quotes values using rules that vary depending on Cookie version. |
static int |
maybeQuote2(int version,
java.lang.StringBuffer buf,
java.lang.String value,
boolean allowVersionSwitch)
|
static int |
maybeQuote2(int version,
java.lang.StringBuffer buf,
java.lang.String value,
java.lang.String literals,
boolean allowVersionSwitch)
|
void |
recycle()
|
void |
setMaxAge(int expiry)
|
void |
setSecure(boolean flag)
|
void |
setVersion(int v)
|
java.lang.String |
toString()
|
static void |
unescapeDoubleQuotes(ByteChunk bc)
Unescapes any double quotes in the given cookie value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean STRICT_SERVLET_COMPLIANCE
public static final boolean ALWAYS_ADD_EXPIRES
Constructor Detail |
---|
public ServerCookie()
Method Detail |
---|
public void recycle()
public MessageBytes getComment()
public MessageBytes getDomain()
public void setMaxAge(int expiry)
public int getMaxAge()
public MessageBytes getPath()
public void setSecure(boolean flag)
public boolean getSecure()
public MessageBytes getName()
public MessageBytes getValue()
public int getVersion()
public void setVersion(int v)
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean isToken(java.lang.String value)
public static boolean isToken(java.lang.String value, java.lang.String literals)
public static boolean containsCTL(java.lang.String value, int version)
public static boolean isToken2(java.lang.String value)
public static boolean isToken2(java.lang.String value, java.lang.String literals)
public static boolean checkName(java.lang.String name)
public java.lang.String getCookieHeaderName()
public static java.lang.String getCookieHeaderName(int version)
public static void appendCookieValue(java.lang.StringBuffer headerBuf, int version, java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, java.lang.String comment, int maxAge, boolean isSecure, boolean isHttpOnly)
@Deprecated public static void maybeQuote(int version, java.lang.StringBuffer buf, java.lang.String value)
public static boolean alreadyQuoted(java.lang.String value)
public static int maybeQuote2(int version, java.lang.StringBuffer buf, java.lang.String value)
version
- buf
- value
- public static int maybeQuote2(int version, java.lang.StringBuffer buf, java.lang.String value, boolean allowVersionSwitch)
public static int maybeQuote2(int version, java.lang.StringBuffer buf, java.lang.String value, java.lang.String literals, boolean allowVersionSwitch)
public static void unescapeDoubleQuotes(ByteChunk bc)
bc
- The cookie value to modify
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |