public class HttpCookie extends Object
Constructor and Description |
---|
HttpCookie(String name,
String value)
Initiate.
|
HttpCookie(String name,
String value,
long expireTime,
String domain,
String path)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Obtains the name.
|
String |
getValue()
Obtains the value.
|
static List<HttpCookie> |
parse(String httpHeaderValue)
Parses the
HttpCookie instances from the HttpHeader
value. |
void |
setDomain(String domain)
Specifies the domain.
|
void |
setExpires(long expireTime)
Specifies the time this
HttpCookie expires. |
void |
setPath(String path)
Specifies the path.
|
String |
toHttpResponseHeaderValue()
|
String |
toString() |
public HttpCookie(String name, String value)
name
- Name.value
- Value.public HttpCookie(String name, String value, long expireTime, String domain, String path)
name
- Name.value
- Value.expireTime
- Time that the HttpCookie
will be expired.domain
- Domain.path
- Path.public static List<HttpCookie> parse(String httpHeaderValue)
HttpCookie
instances from the HttpHeader
value.httpHeaderValue
- Value of the HttpHeader
.HttpCookie
instances.public String getName()
public String getValue()
public void setExpires(long expireTime)
HttpCookie
expires.expireTime
- Time this HttpCookie
expires.public void setDomain(String domain)
domain
- Domain.public void setPath(String path)
path
- Path.public String toHttpResponseHeaderValue()
HttpResponse
HttpHeader
value for this
HttpCookie
.Copyright © 2005–2016. All rights reserved.