@Contract(threading=SAFE) public class BasicCookieStore extends Object implements CookieStore, Serializable
CookieStore| 构造器和说明 |
|---|
BasicCookieStore() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addCookie(Cookie cookie)
Adds an
HTTP cookie, replacing any existing equivalent cookies. |
void |
addCookies(Cookie[] cookies)
Adds an array of
HTTP cookies. |
void |
clear()
Clears all cookies.
|
boolean |
clearExpired(Date date)
|
boolean |
clearExpired(Instant instant)
|
List<Cookie> |
getCookies()
Returns an immutable array of
cookies that this HTTP
state currently contains. |
String |
toString() |
public void addCookie(Cookie cookie)
HTTP cookie, replacing any existing equivalent cookies.
If the given cookie has already expired it will not be added, but existing
values will still be removed.addCookie 在接口中 CookieStorecookie - the cookie to be addedaddCookies(Cookie[])public void addCookies(Cookie[] cookies)
HTTP cookies. Cookies are added individually and
in the given array order. If any of the given cookies has already expired it will
not be added, but existing values will still be removed.cookies - the cookies to be addedaddCookie(Cookie)public List<Cookie> getCookies()
cookies that this HTTP
state currently contains.getCookies 在接口中 CookieStorecookies.public boolean clearExpired(Date date)
clearExpired 在接口中 CookieStoreCookie.isExpired(Date)public boolean clearExpired(Instant instant)
clearExpired 在接口中 CookieStoreCookie.isExpired(Instant)public void clear()
clear 在接口中 CookieStoreCopyright © 2023. All rights reserved.