public class Cookie extends Object implements NamedValue<String>
Request.getCookies() method.CookieSetting class instead.Request.getCookies()| Constructor and Description |
|---|
Cookie()
Default constructor.
|
Cookie(int version,
String name,
String value)
Constructor.
|
Cookie(int version,
String name,
String value,
String path,
String domain)
Constructor.
|
Cookie(String name,
String value)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getDomain()
Returns the domain name.
|
String |
getName()
Returns the name.
|
String |
getPath()
Returns the validity path.
|
String |
getValue()
Returns the value.
|
int |
getVersion()
Returns the cookie specification version.
|
int |
hashCode() |
void |
setDomain(String domain)
Sets the domain name.
|
void |
setName(String name)
Sets the name.
|
void |
setPath(String path)
Sets the validity path.
|
void |
setValue(String value)
Sets the value.
|
void |
setVersion(int version)
Sets the cookie specification version.
|
String |
toString() |
public Cookie()
public Cookie(int version,
String name,
String value)
version - The version number.name - The name.value - The value.public Cookie(int version,
String name,
String value,
String path,
String domain)
version - The version number.name - The name.value - The value.path - The validity path.domain - The domain name.public String getDomain()
public String getName()
getName in interface NamedValue<String>public String getPath()
public String getValue()
getValue in interface NamedValue<String>public int getVersion()
public void setDomain(String domain)
domain - The domain name.public void setName(String name)
name - The name.public void setPath(String path)
path - The validity path.public void setValue(String value)
setValue in interface NamedValue<String>value - The value.public void setVersion(int version)
version - The cookie specification version.Copyright © 2005–2025. All rights reserved.