Top Description Methods
org.apache.http.client

public Interface CookieStore

Known Direct Implementers
org.apache.http.impl.client.BasicCookieStore
Imports
java.util.Date, .List, org.apache.http.cookie.Cookie

This interface represents an abstract store for Cookie objects.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
addCookie(Cookie
the cookie to be added
cookie
)

Adds an Cookie, replacing any existing equivalent cookies.

public void
clear()

Clears all cookies.

public boolean

Returns:

true if any cookies were purged.
clearExpired
(Date date)

Removes all of Cookies in this store that have expired by the specified java.util.Date.

public List<Cookie>

Returns:

all cookies
getCookies
()

Returns all cookies contained in this store.

Method Detail

addCookieback to summary
public void addCookie(Cookie cookie)

Adds an 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:Cookie

the cookie to be added

clearback to summary
public void clear()

Clears all cookies.

clearExpiredback to summary
public boolean clearExpired(Date date)

Removes all of Cookies in this store that have expired by the specified java.util.Date.

Returns:boolean

true if any cookies were purged.

getCookiesback to summary
public List<Cookie> getCookies()

Returns all cookies contained in this store.

Returns:List<Cookie>

all cookies