public class Cookie extends Object
| Modifier and Type | Field and Description |
|---|---|
static java.time.format.DateTimeFormatter |
DEFAULT_PATTERN |
| Constructor and Description |
|---|
Cookie(String v)
Construct a cookie from a set-cookie value
|
Cookie(String name,
String value) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDomain() |
java.time.ZonedDateTime |
getExpiration()
Per Wikipedia:
The Expires attribute defines a specific date and time for when the browser should delete the cookie.
|
int |
getMaxAge()
Per Wikipedia:
the Max-Age attribute can be used to set the cookie's expiration as an interval of seconds in the future,
relative to the time the browser received the cookie.
|
String |
getName() |
String |
getPath() |
String |
getValue() |
boolean |
isHttpOnly()
Per Wikipedia:
The HttpOnly attribute directs browsers not to expose cookies through channels other than HTTP (and HTTPS) requests.
|
boolean |
isSecure()
Per Wikipedia:
The Secure attribute is meant to keep cookie communication limited to encrypted transmission,
directing browsers to use cookies only via secure/encrypted connections.
|
void |
setDomain(String domain) |
void |
setHttpOnly(boolean httpOnly) |
void |
setPath(String path) |
String |
toString() |
public Cookie(String v)
v - cookie string valuepublic void setDomain(String domain)
public void setPath(String path)
public void setHttpOnly(boolean httpOnly)
public String getName()
public String getValue()
public String getDomain()
public String getPath()
public boolean isHttpOnly()
public boolean isSecure()
public int getMaxAge()
public java.time.ZonedDateTime getExpiration()
Copyright © 2020. All rights reserved.