Package org.apache.http.client
Interface CookieStore
- All Known Implementing Classes:
BasicCookieStore
public interface CookieStore
Abstract cookie store.
- Since:
- 4.0
- Author:
- Oleg Kalnichevski
-
Method Summary
Modifier and Type Method Description voidaddCookie(Cookie cookie)Adds anHTTP cookie, replacing any existing equivalent cookies.voidclear()Clears all cookies.booleanclearExpired(Date date)List<Cookie>getCookies()Returns all cookies contained in this store.
-
Method Details
-
addCookie
Adds anHTTP 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.- Parameters:
cookie- thecookieto be added
-
getCookies
Returns all cookies contained in this store.- Returns:
- all cookies
-
clearExpired
- Returns:
- true if any cookies were purged.
-
clear
void clear()Clears all cookies.
-