Constructs a cookie with the specified name and value.
Returns the comment describing the purpose of this cookie, or <code>null</code> if the cookie has no comment.
Gets the domain name of this Cookie.
Gets the maximum age in seconds of this Cookie.
Returns the name of the cookie. The name cannot be changed after creation.
Returns the path on the server to which the browser returns this cookie. The cookie is visible to all subpaths on the server.
Returns <code>true</code> if the browser is sending cookies only over a secure protocol, or <code>false</code> if the browser can send cookies using any protocol.
Gets the current value of this Cookie.
Returns the version of the protocol this cookie complies with. Version 1 complies with RFC 2109, and version 0 complies with the original cookie specification drafted by Netscape. Cookies provided by a browser use and identify the browser's cookie version.
Reports whether this HTTP cookie has expired or not.
Checks whether this Cookie has been marked as <i>HttpOnly</i>.
Specifies a comment that describes a cookie's purpose. The comment is useful if the browser presents the cookie to the user. Comments are not supported by Netscape Version 0 cookies.
Specifies the domain within which this cookie should be presented.
Marks or unmarks this Cookie as <i>HttpOnly</i>.
Sets the maximum age in seconds for this Cookie.
Specifies a path for the cookie to which the client should return the cookie.
Indicates to the browser whether the cookie should only be sent using a secure protocol, such as HTTPS or SSL.
Assigns a new value to this Cookie.
Sets the version of the cookie protocol that this Cookie complies with.
An HttpCookie object represents an HTTP cookie, which carries state information between server and user agent. Cookie is widely adopted to create stateful sessions.
<p> There are 3 HTTP cookie specifications: <blockquote> Netscape draft<br> RFC 2109 - <a href="http://www.ietf.org/rfc/rfc2109.txt"> <i>http://www.ietf.org/rfc/rfc2109.txt</i></a><br> RFC 2965 - <a href="http://www.ietf.org/rfc/rfc2965.txt"> <i>http://www.ietf.org/rfc/rfc2965.txt</i></a> </blockquote>
<p> HttpCookie class can accept all these 3 forms of syntax.
@author Edward Wang