All Packages Class Hierarchy This Package Previous Next Index
Class Acme.Serve.servlet.http.Cookie
java.lang.Object
|
+----Acme.Serve.servlet.http.Cookie
- public class Cookie
- extends Object
- implements Cloneable
An HTTP cookie.
This is taken from JavaSoft's Servlet API documentation.
Fetch the software.
Fetch the entire Acme package.
-
Cookie(String, String)
- Defines a cookie with an initial name and value.
-
clone()
- Copies the cookie.
-
getComment()
- Returns the comment describing the purpose of this cookie, or null if
no such comment has been defined.
-
getDomain()
- Returns the domain of the cookie.
-
getMaxAge()
- Returns the maximum specified age of the cookie.
-
getName()
- Returns the name of the cookie.
-
getPath()
- Returns the prefix of all URLs for which this cookie is targetted.
-
getSecure()
- Returns the value of the 'secure' flag.
-
getValue()
- Returns the value of the cookie.
-
getVersion()
- Returns the version of the cookie.
-
setComment(String)
- If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described using this comment.
-
setDomain(String)
- This cookie should be presented only to hosts satisfying this domain
name pattern.
-
setMaxAge(int)
- Sets the maximum age of the cookie.
-
setPath(String)
- This cookie should be presented only with requests beginning with
this URL.
-
setSecure(boolean)
- Indicates to the user agent that the cookie should only be sent using
a secure protocol (https).
-
setValue(String)
- Sets the value of the cookie.
-
setVersion(int)
- Sets the version of the cookie protocol used when this cookie saves
itself.
Cookie
public Cookie(String name,
String value)
- Defines a cookie with an initial name and value.
setComment
public void setComment(String comment)
- If a user agent (web browser) presents this cookie to a user, the
cookie's purpose will be described using this comment.
getComment
public String getComment()
- Returns the comment describing the purpose of this cookie, or null if
no such comment has been defined.
setDomain
public void setDomain(String domain)
- This cookie should be presented only to hosts satisfying this domain
name pattern.
getDomain
public String getDomain()
- Returns the domain of the cookie.
setMaxAge
public void setMaxAge(int maxAge)
- Sets the maximum age of the cookie.
getMaxAge
public int getMaxAge()
- Returns the maximum specified age of the cookie.
setPath
public void setPath(String path)
- This cookie should be presented only with requests beginning with
this URL. Read RFC 2109 for a specification of the default behaviour.
Basically, URLs in the same "directory" as the one which set the
cookie, and in subdirectories, can all see the cookie unless a
different path is set.
getPath
public String getPath()
- Returns the prefix of all URLs for which this cookie is targetted.
setSecure
public void setSecure(boolean secure)
- Indicates to the user agent that the cookie should only be sent using
a secure protocol (https).
getSecure
public boolean getSecure()
- Returns the value of the 'secure' flag.
getName
public String getName()
- Returns the name of the cookie.
setValue
public void setValue(String value)
- Sets the value of the cookie. BASE64 encoding is suggested for use
with binary values.
getValue
public String getValue()
- Returns the value of the cookie.
setVersion
public void setVersion(int vesion)
- Sets the version of the cookie protocol used when this cookie saves
itself. Since the IETF standards are still being finalized, consider
version 1 as experimental; do not use it (yet) on production sites.
getVersion
public int getVersion()
- Returns the version of the cookie. Version 1 complies with RFC 2109,
version 0 indicates the original version, as specified by Netscape.
Newly constructed cookies use version 0 by default, to maximize
interoperability. Cookies provided by a user agent will identify
the cookie version used by the browser.
clone
public Object clone()
- Copies the cookie.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs