org.apache.tomcat.util.http
Class ServerCookie
java.lang.Object
org.apache.tomcat.util.http.ServerCookie
- Serializable
public class ServerCookie
extends java.lang.Object
implements 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.
static void | appendCookieValue(StringBuffer buf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure)
|
static boolean | checkName(String name)
|
MessageBytes | getComment()
|
String | getCookieHeaderName() - Return the header name to set the cookie, based on cookie
version
|
static 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(String value)
|
static void | log(String s)
|
static void | maybeQuote(int version, StringBuffer buf, String value)
|
void | recycle()
|
void | setMaxAge(int expiry)
|
void | setSecure(boolean flag)
|
void | setVersion(int v)
|
String | toString()
|
ServerCookie
public ServerCookie()
appendCookieValue
public static void appendCookieValue(StringBuffer buf,
int version,
String name,
String value,
String path,
String domain,
String comment,
int maxAge,
boolean isSecure)
checkName
public static boolean checkName(String name)
getCookieHeaderName
public String getCookieHeaderName()
Return the header name to set the cookie, based on cookie
version
getCookieHeaderName
public static String getCookieHeaderName(int version)
Return the header name to set the cookie, based on cookie
version
getMaxAge
public int getMaxAge()
getSecure
public boolean getSecure()
getVersion
public int getVersion()
isToken
public static boolean isToken(String value)
log
public static void log(String s)
maybeQuote
public static void maybeQuote(int version,
StringBuffer buf,
String value)
recycle
public void recycle()
setMaxAge
public void setMaxAge(int expiry)
setSecure
public void setSecure(boolean flag)
setVersion
public void setVersion(int v)
toString
public String toString()
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.