com.mortbay.HTTP
Class Cookies
java.lang.Object
|
+--com.mortbay.HTTP.Cookies
- public class Cookies
- extends java.lang.Object
Hashtable of cookies
- Version:
- $Revision: 2.11 $ $Date: 2000/05/03 07:43:32 $
- Author:
- Greg Wilkins (gregw)
Field Summary |
static java.text.SimpleDateFormat |
__dateSend
|
Method Summary |
static javax.servlet.http.Cookie[] |
decode(java.lang.String buffer)
Decode received cookies. |
void |
setCookie(javax.servlet.http.Cookie cookie)
Set a cookie. |
void |
setCookie(java.lang.String name,
java.lang.String value)
Set a cookie. |
void |
setCookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
int maxAge,
boolean secure)
Set Cookie
Cookie setting are unique for a given name & path pair. |
java.lang.String |
toString()
|
static java.lang.String |
toString(javax.servlet.http.Cookie cookie)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
__dateSend
public static final java.text.SimpleDateFormat __dateSend
Cookies
public Cookies()
setCookie
public void setCookie(javax.servlet.http.Cookie cookie)
- Set a cookie.
setCookie
public void setCookie(java.lang.String name,
java.lang.String value)
- Set a cookie.
Default values used except path which is set to "/".
Cookie setting are unique for a given name & path pair.
setCookie
public void setCookie(java.lang.String name,
java.lang.String value,
java.lang.String domain,
java.lang.String path,
int maxAge,
boolean secure)
- Set Cookie
Cookie setting are unique for a given name & path pair.
- Parameters:
name
- The cookie namevalue
- The cookie value which must not contain ';'.domain
- The domain, which must be a subdomain of the server.
If null is passed the default of this domain is used.path
- The path the cookie applies to.
If null is passed the default of "/" is used.maxAge
- the seconds until the cookie expires. A negative value
implies browser session and zero causes the cookie to be
deleted.secure
- if true the cookie is flagged secure.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
toString
public static java.lang.String toString(javax.servlet.http.Cookie cookie)
decode
public static javax.servlet.http.Cookie[] decode(java.lang.String buffer)
- Decode received cookies.
- Parameters:
buffer
- Contains encoded cookies- Returns:
- Array of Cookies.