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.


Constructor Index

 o Cookie(String, String)
Defines a cookie with an initial name and value.

Method Index

 o clone()
Copies the cookie.
 o getComment()
Returns the comment describing the purpose of this cookie, or null if no such comment has been defined.
 o getDomain()
Returns the domain of the cookie.
 o getMaxAge()
Returns the maximum specified age of the cookie.
 o getName()
Returns the name of the cookie.
 o getPath()
Returns the prefix of all URLs for which this cookie is targetted.
 o getSecure()
Returns the value of the 'secure' flag.
 o getValue()
Returns the value of the cookie.
 o getVersion()
Returns the version of the cookie.
 o setComment(String)
If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described using this comment.
 o setDomain(String)
This cookie should be presented only to hosts satisfying this domain name pattern.
 o setMaxAge(int)
Sets the maximum age of the cookie.
 o setPath(String)
This cookie should be presented only with requests beginning with this URL.
 o setSecure(boolean)
Indicates to the user agent that the cookie should only be sent using a secure protocol (https).
 o setValue(String)
Sets the value of the cookie.
 o setVersion(int)
Sets the version of the cookie protocol used when this cookie saves itself.

Constructors

 o Cookie
 public Cookie(String name,
               String value)
Defines a cookie with an initial name and value.

Methods

 o 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.

 o getComment
 public String getComment()
Returns the comment describing the purpose of this cookie, or null if no such comment has been defined.

 o setDomain
 public void setDomain(String domain)
This cookie should be presented only to hosts satisfying this domain name pattern.

 o getDomain
 public String getDomain()
Returns the domain of the cookie.

 o setMaxAge
 public void setMaxAge(int maxAge)
Sets the maximum age of the cookie.

 o getMaxAge
 public int getMaxAge()
Returns the maximum specified age of the cookie.

 o 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.

 o getPath
 public String getPath()
Returns the prefix of all URLs for which this cookie is targetted.

 o setSecure
 public void setSecure(boolean secure)
Indicates to the user agent that the cookie should only be sent using a secure protocol (https).

 o getSecure
 public boolean getSecure()
Returns the value of the 'secure' flag.

 o getName
 public String getName()
Returns the name of the cookie.

 o setValue
 public void setValue(String value)
Sets the value of the cookie. BASE64 encoding is suggested for use with binary values.

 o getValue
 public String getValue()
Returns the value of the cookie.

 o 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.

 o 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.

 o 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