public class Cookie extends Object
Note that all names and values will be URL Encoded.
Modifier and Type | Method and Description |
---|---|
String |
domain() |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
long |
maxAge() |
String |
name() |
String |
path() |
static Cookie |
secureCookie(String name,
String value)
Creates a new cookie with secure settings such as HttpOnly and Secure set to true.
|
void |
setDomain(String domain) |
void |
setHttpOnly(boolean httpOnly) |
void |
setMaxAge(long maxAge) |
void |
setPath(String path) |
void |
setSecure(boolean secure) |
void |
setValue(String value) |
String |
toString() |
String |
value() |
public static Cookie secureCookie(String name, String value)
name
- The name of the cookievalue
- The value of the cookiepublic String name()
public String value()
public void setValue(String value)
public String domain()
public void setDomain(String domain)
public String path()
public void setPath(String path)
public long maxAge()
public void setMaxAge(long maxAge)
public boolean isSecure()
public void setSecure(boolean secure)
public boolean isHttpOnly()
public void setHttpOnly(boolean httpOnly)
Copyright © 2017–2018. All rights reserved.