public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
SetCookie2 。
COMMENT_ATTR, COMMENTURL_ATTR, DISCARD_ATTR, DOMAIN_ATTR, EXPIRES_ATTR, MAX_AGE_ATTR, PATH_ATTR, PORT_ATTR, SECURE_ATTR, VERSION_ATTR| Constructor and Description |
|---|
BasicClientCookie2(String name, String value)
默认构造函数取名字和值。
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
String |
getCommentURL()
返回null。
|
int[] |
getPorts()
返回null。
|
boolean |
isExpired(Date date)
如果此cookie已过期,则返回true。
|
boolean |
isPersistent()
返回 false如果cookie应该在“会话”结尾处丢弃;
true否则。
|
void |
setCommentURL(String commentURL)
如果用户代理(Web浏览器)向用户显示此Cookie,则Cookie的用途将由此URL上的信息描述。
|
void |
setDiscard(boolean discard)
设置Discard属性。
|
void |
setPorts(int[] ports)
设置端口属性。
|
containsAttribute, getAttribute, getComment, getCreationDate, getDomain, getExpiryDate, getName, getPath, getValue, getVersion, isSecure, removeAttribute, setAttribute, setComment, setCreationDate, setDomain, setExpiryDate, setPath, setSecure, setValue, setVersion, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetComment, setDomain, setExpiryDate, setPath, setSecure, setValue, setVersiongetComment, getDomain, getExpiryDate, getName, getPath, getValue, getVersion, isSecurepublic int[] getPorts()
BasicClientCookie复制
getPorts在接口
Cookie
getPorts在
BasicClientCookie
public void setPorts(int[] ports)
SetCookie2复制
setPorts在接口
SetCookie2
public String getCommentURL()
BasicClientCookie复制
getCommentURL在接口
Cookie
getCommentURL在
BasicClientCookie
public void setCommentURL(String commentURL)
SetCookie2复制
setCommentURL在接口
SetCookie2
public void setDiscard(boolean discard)
SetCookie2复制
Discard属性覆盖Max-age 。
setDiscard在接口
SetCookie2
Cookie.isPersistent()
public boolean isPersistent()
BasicClientCookie复制
false如果cookie应该在“会话”结尾处丢弃;
true否则。
isPersistent在接口
Cookie
isPersistent在
BasicClientCookie类
false如果cookie应该在“会话”结束时被丢弃;
true否则
public boolean isExpired(Date date)
BasicClientCookie复制
isExpired在接口
Cookie
isExpired在
BasicClientCookie类
date - 当前时间
true如果cookie已经过期。
public Object clone() throws CloneNotSupportedException
Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.