Cookie implementation.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private boolean | |
| private long | |
| private final String | |
| private boolean | |
| private String | |
| private CookieHeaderNames. | |
| private boolean | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(Cookie
the object to be compared. c)Implements java. |
| public String | domain()
Implements io. Cookie.
|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int | |
| public boolean | isHttpOnly()
Implements io. Cookie can only be accessed via HTTP.
|
| public boolean | Returns: True if thisCookie is partitioned, otherwise falseChecks to see if this |
| public boolean | isSecure()
Implements io. Cookie is secure
|
| public long | maxAge()
Implements io. Cookie in seconds or Cookie#UNDEFINED_MAX_AGE if unspecified
|
| public String | |
| public String | |
| public CookieHeaderNames. | |
| public void | setDomain(String
The domain to use domain)Implements io. Cookie.
|
| public void | setHttpOnly(boolean
True if the httpOnly)Cookie is HTTP only, otherwise false.Implements io. Cookie is HTTP only.
|
| public void | setMaxAge(long
The maximum age of this maxAge)Cookie in secondsImplements io. Cookie in seconds.
|
| public void | setPartitioned(boolean
True if this partitioned)Cookie is to be partitioned, otherwise falseSets the |
| public void | setPath(String
The path to use for this path)CookieImplements io. Cookie.
|
| public void | setSameSite(CookieHeaderNames.
same-site-flag value sameSiteDetermines if this this |
| public void | setSecure(boolean
True if this secure)Cookie is to be secure, otherwise falseImplements io. Cookie
|
| public void | setValue(String
The value to set value)Implements io. Cookie.
|
| public void | setWrap(boolean
true if wrap wrap)Implements io. Cookie
is to be wrapped with double quotes.
|
| public String | |
| protected String | Returns: the trimmed, validated attribute valueattribute name name, String attribute value value)
Deprecated
CookieUtil is package private, will be removed once old Cookie API is dropped
Validate a cookie attribute value, throws a IllegalArgumentException otherwise.
|
| public String | value()
Implements io. Cookie.
|
| public boolean | wrap()
Implements io. Cookie,
was wrapped with double quotes in original Set-Cookie header.
|
| domain | back to summary |
|---|---|
| private String domain | |
| httpOnly | back to summary |
|---|---|
| private boolean httpOnly | |
| maxAge | back to summary |
|---|---|
| private long maxAge | |
| name | back to summary |
|---|---|
| private final String name | |
| partitioned | back to summary |
|---|---|
| private boolean partitioned | |
| path | back to summary |
|---|---|
| private String path | |
| sameSite | back to summary |
|---|---|
| private CookieHeaderNames. | |
| secure | back to summary |
|---|---|
| private boolean secure | |
| value | back to summary |
|---|---|
| private String value | |
| wrap | back to summary |
|---|---|
| private boolean wrap | |
| DefaultCookie | back to summary |
|---|---|
| public DefaultCookie(String name, String value) Creates a new cookie with the specified name and value. | |
| compareTo | back to summary |
|---|---|
| public int compareTo(Cookie c) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| domain | back to summary |
|---|---|
| public String domain() Implements io. Doc from io. Returns the domain of this | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isHttpOnly | back to summary |
|---|---|
| public boolean isHttpOnly() Implements io. Doc from io. Checks to see if this | |
| isPartitioned | back to summary |
|---|---|
| public boolean isPartitioned() Checks to see if this
| |
| isSecure | back to summary |
|---|---|
| public boolean isSecure() Implements io. Doc from io. Checks to see if this | |
| maxAge | back to summary |
|---|---|
| public long maxAge() Implements io. Doc from io. Returns the maximum age of this | |
| name | back to summary |
|---|---|
| public String name() Implements io. Doc from io. Returns the name of this | |
| path | back to summary |
|---|---|
| public String path() Implements io. Doc from io. Returns the path of this | |
| sameSite | back to summary |
|---|---|
| public CookieHeaderNames. Checks to see if this
| |
| setDomain | back to summary |
|---|---|
| public void setDomain(String domain) Implements io. Doc from io. Sets the domain of this | |
| setHttpOnly | back to summary |
|---|---|
| public void setHttpOnly(boolean httpOnly) Implements io. Doc from io. Determines if this | |
| setMaxAge | back to summary |
|---|---|
| public void setMaxAge(long maxAge) Implements io. Doc from io. Sets the maximum age of this | |
| setPartitioned | back to summary |
|---|---|
| public void setPartitioned(boolean partitioned) Sets the
| |
| setPath | back to summary |
|---|---|
| public void setPath(String path) Implements io. Doc from io. Sets the path of this | |
| setSameSite | back to summary |
|---|---|
| public void setSameSite(CookieHeaderNames. Determines if this this
| |
| setSecure | back to summary |
|---|---|
| public void setSecure(boolean secure) Implements io. Doc from io. Sets the security getStatus of this | |
| setValue | back to summary |
|---|---|
| public void setValue(String value) Implements io. Doc from io. Sets the value of this | |
| setWrap | back to summary |
|---|---|
| public void setWrap(boolean wrap) Implements io. Doc from io. Sets true if the value of this
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| validateValue | back to summary |
|---|---|
| protected String validateValue(String name, String value)
Deprecated CookieUtil is package private, will be removed once old Cookie API is dropped Validate a cookie attribute value, throws a
| |
| value | back to summary |
|---|---|
| public String value() Implements io. Doc from io. Returns the value of this | |
| wrap | back to summary |
|---|---|
| public boolean wrap() Implements io. Doc from io. Returns true if the raw value of this | |