Example usage for Java java.net HttpCookie fields, constructors, methods, implement or subclass
The text is from its open source code.
HttpCookie(String name, String value) Constructs a cookie with a specified name and value. |
Object | clone() Create and return a copy of this object. |
boolean | domainMatches(String domain, String host) The utility method to check whether a host name is in a domain or not. |
String | getComment() Returns the comment describing the purpose of this cookie, or null if the cookie has no comment. |
String | getCommentURL() Returns the comment URL describing the purpose of this cookie, or null if the cookie has no comment URL. |
boolean | getDiscard() Returns the discard attribute of the cookie |
String | getDomain() Returns the domain name set for this cookie. |
long | getMaxAge() Returns the maximum age of the cookie, specified in seconds. |
String | getName() Returns the name of the cookie. |
String | getPath() Returns the path on the server to which the browser returns this cookie. |
String | getPortlist() Returns the port list attribute of the cookie |
boolean | getSecure() Returns true if sending this cookie should be restricted to a secure protocol, or false if the it can be sent using any protocol. |
String | getValue() Returns the value of the cookie. |
int | getVersion() Returns the version of the protocol this cookie complies with. |
boolean | hasExpired() Reports whether this HTTP cookie has expired or not. |
int | hashCode() Returns the hash code of this HTTP cookie. |
boolean | isHttpOnly() Returns true if this cookie contains the HttpOnly attribute. |
List | parse(String header) Constructs cookies from set-cookie or set-cookie2 header string. |
void | setComment(String purpose) Specifies a comment that describes a cookie's purpose. |
void | setCommentURL(String purpose) Specifies a comment URL that describes a cookie's purpose. |
void | setDiscard(boolean discard) Specify whether user agent should discard the cookie unconditionally. |
void | setDomain(String pattern) Specifies the domain within which this cookie should be presented. |
void | setHttpOnly(boolean httpOnly) Indicates whether the cookie should be considered HTTP Only. |
void | setMaxAge(long expiry) Sets the maximum age of the cookie in seconds. |
void | setPath(String uri) Specifies a path for the cookie to which the client should return the cookie. |
void | setPortlist(String ports) Specify the portlist of the cookie, which restricts the port(s) to which a cookie may be sent back in a Cookie header. |
void | setSecure(boolean flag) Indicates whether the cookie should only be sent using a secure protocol, such as HTTPS or SSL. |
void | setValue(String newValue) Assigns a new value to a cookie after the cookie is created. |
void | setVersion(int v) Sets the version of the cookie protocol this cookie complies with. |
String | toString() Constructs a cookie header string representation of this cookie, which is in the format defined by corresponding cookie specification, but without the leading "Cookie:" token. |