本文整理了Java中org.apache.http.cookie.Cookie.getExpiryDate()
方法的一些代码示例,展示了Cookie.getExpiryDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cookie.getExpiryDate()
方法的具体详情如下:
包路径:org.apache.http.cookie.Cookie
类名称:Cookie
方法名:getExpiryDate
[英]Returns the expiration Date of the cookie, or null if none exists.
Note: the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril.
[中]返回cookie的过期日期,如果不存在,则返回null。
注意:此方法返回的对象被认为是不可变的。更改它(例如使用setTime())可能会导致未定义的行为。这样做会有危险。
代码示例来源:origin: robovm/robovm
/**
* Don't log the cookie's value; that's potentially sensitive information.
*/
private String cookieToString(Cookie cookie) {
return cookie.getClass().getSimpleName()
+ "[version=" + cookie.getVersion()
+ ",name=" + cookie.getName()
+ ",domain=" + cookie.getDomain()
+ ",path=" + cookie.getPath()
+ ",expiry=" + cookie.getExpiryDate()
+ "]";
}
// END android-added
代码示例来源:origin: internetarchive/heritrix3
line.append(cookie.isSecure() ? "TRUE" : "FALSE");
line.append(tab);
line.append(cookie.getExpiryDate() != null ? cookie.getExpiryDate().getTime() / 1000 : -1);
line.append(tab);
line.append(cookie.getName());
代码示例来源:origin: com.github.mjeanroy/rest-assert-core
@Override
public Date getExpires() {
return cookie.getExpiryDate();
}
}
代码示例来源:origin: org.apache.knox/gateway-spi
@Override
public Date getExpiryDate() {
return delegate.getExpiryDate();
}
代码示例来源:origin: apache/knox
@Override
public Date getExpiryDate() {
return delegate.getExpiryDate();
}
代码示例来源:origin: slartus/4pdaClient-plus
public Date getExpiryDate() {
return cookie.getExpiryDate();
}
代码示例来源:origin: slartus/4pdaClient-plus
public boolean clearExpired(Date date) {
for (int i = m_Cookies.size() - 1; i >= 0; i--) {
if (m_Cookies.get(i).getExpiryDate() != null && date != null && date.after(m_Cookies.get(i).getExpiryDate())) {
m_Cookies.remove(i);
break;
}
}
return true; //To change body of implemented methods use File | Settings | File Templates.
}
代码示例来源:origin: dounine/clouddisk
@Override
public boolean clearExpired(Date date) {
final Iterator<Cookie> ci = cookies.iterator();
while(ci.hasNext()){
final Cookie cookie = ci.next();
if(date.equals(cookie.getExpiryDate())){
ci.remove();
return true;
}
}
return false;
}
代码示例来源:origin: grzegorznittner/chanu
private void writeObject(ObjectOutputStream out) throws IOException {
out.writeObject(cookie.getName());
out.writeObject(cookie.getValue());
out.writeObject(cookie.getComment());
out.writeObject(cookie.getDomain());
out.writeObject(cookie.getExpiryDate());
out.writeObject(cookie.getPath());
out.writeInt(cookie.getVersion());
out.writeBoolean(cookie.isSecure());
}
代码示例来源:origin: yiwent/Mobike
private void writeObject(ObjectOutputStream out) throws IOException {
out.writeObject(cookie.getName());
out.writeObject(cookie.getValue());
out.writeObject(cookie.getComment());
out.writeObject(cookie.getDomain());
out.writeObject(cookie.getExpiryDate());
out.writeObject(cookie.getPath());
out.writeInt(cookie.getVersion());
out.writeBoolean(cookie.isSecure());
}
代码示例来源:origin: org.restcomm/restcomm-connect.dao
private Map<String, Object> toMap(final Sid sid, final Cookie cookie) {
final Map<String, Object> map = new HashMap<String, Object>();
map.put("sid", DaoUtils.writeSid(sid));
map.put("comment", cookie.getComment());
map.put("domain", cookie.getDomain());
map.put("expiration_date", cookie.getExpiryDate());
map.put("name", cookie.getName());
map.put("path", cookie.getPath());
map.put("value", cookie.getValue());
map.put("version", cookie.getVersion());
return map;
}
}
代码示例来源:origin: sealtalk/sealtalk-android
private void writeObject(ObjectOutputStream out) throws IOException {
out.writeObject(cookie.getName());
out.writeObject(cookie.getValue());
out.writeObject(cookie.getComment());
out.writeObject(cookie.getDomain());
out.writeObject(cookie.getExpiryDate());
out.writeObject(cookie.getPath());
out.writeInt(cookie.getVersion());
out.writeBoolean(cookie.isSecure());
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Don't log the cookie's value; that's potentially sensitive information.
*/
private String cookieToString(Cookie cookie) {
return cookie.getClass().getSimpleName()
+ "[version=" + cookie.getVersion()
+ ",name=" + cookie.getName()
+ ",domain=" + cookie.getDomain()
+ ",path=" + cookie.getPath()
+ ",expiry=" + cookie.getExpiryDate()
+ "]";
}
// END android-added
代码示例来源:origin: MobiVM/robovm
/**
* Don't log the cookie's value; that's potentially sensitive information.
*/
private String cookieToString(Cookie cookie) {
return cookie.getClass().getSimpleName()
+ "[version=" + cookie.getVersion()
+ ",name=" + cookie.getName()
+ ",domain=" + cookie.getDomain()
+ ",path=" + cookie.getPath()
+ ",expiry=" + cookie.getExpiryDate()
+ "]";
}
// END android-added
代码示例来源:origin: FlexoVM/flexovm
/**
* Don't log the cookie's value; that's potentially sensitive information.
*/
private String cookieToString(Cookie cookie) {
return cookie.getClass().getSimpleName()
+ "[version=" + cookie.getVersion()
+ ",name=" + cookie.getName()
+ ",domain=" + cookie.getDomain()
+ ",path=" + cookie.getPath()
+ ",expiry=" + cookie.getExpiryDate()
+ "]";
}
// END android-added
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Don't log the cookie's value; that's potentially sensitive information.
*/
private String cookieToString(Cookie cookie) {
return cookie.getClass().getSimpleName()
+ "[version=" + cookie.getVersion()
+ ",name=" + cookie.getName()
+ ",domain=" + cookie.getDomain()
+ ",path=" + cookie.getPath()
+ ",expiry=" + cookie.getExpiryDate()
+ "]";
}
// END android-added
代码示例来源:origin: com.cognifide.qa.bb/bb-aem-common
private Cookie findAuthenticationCookie(List<org.apache.http.cookie.Cookie> cookies) {
for (org.apache.http.cookie.Cookie cookie : cookies) {
if (properties.getProperty(ConfigKeys.LOGIN_TOKEN, DEFAULT_LOGIN_TOKEN)
.equals(cookie.getName())) {
return new Cookie(cookie.getName(), cookie.getValue(), cookie.getDomain(), cookie.getPath(),
cookie.getExpiryDate());
}
}
return null;
}
}
代码示例来源:origin: Cognifide/bobcat
private Cookie findAuthenticationCookie(List<org.apache.http.cookie.Cookie> cookies) {
for (org.apache.http.cookie.Cookie cookie : cookies) {
if (properties.getProperty(ConfigKeys.LOGIN_TOKEN, DEFAULT_LOGIN_TOKEN)
.equals(cookie.getName())) {
return new Cookie(cookie.getName(), cookie.getValue(), cookie.getDomain(), cookie.getPath(),
cookie.getExpiryDate());
}
}
return null;
}
}
代码示例来源:origin: de.devbliss.apitester/apitester
Cookie(org.apache.http.cookie.Cookie cookie) {
this.name = cookie.getName();
this.value = cookie.getValue();
this.expires = cookie.getExpiryDate();
this.path = cookie.getPath();
this.domain = cookie.getDomain();
this.httpOnly = false;
this.secure = cookie.isSecure();
}
代码示例来源:origin: com.machinepublishers/jbrowserdriver
private static Cookie convert(org.apache.http.cookie.Cookie in) {
return new Cookie(in.getName(),
in.getValue(),
in.getDomain(),
in.getPath(),
in.getExpiryDate(),
in.isSecure());
}
内容来源于网络,如有侵权,请联系作者删除!