Since: API Level 1
public interface

CookieStore

org.apache.http.client.CookieStore
Known Indirect Subclasses

Class Overview

Abstract cookie store.

Summary

Public Methods
abstract void addCookie(Cookie cookie)
Adds an HTTP cookie, replacing any existing equivalent cookies.
abstract void clear()
Clears all cookies.
abstract boolean clearExpired(Date date)
Removes all of cookies in this store that have expired by the specified date.
abstract List<Cookie> getCookies()
Returns all cookies contained in this store.

Public Methods

public abstract void addCookie (Cookie cookie)

Since: API Level 1

Adds an 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.

Parameters
cookie the cookie to be added

public abstract void clear ()

Since: API Level 1

Clears all cookies.

public abstract boolean clearExpired (Date date)

Since: API Level 1

Removes all of cookies in this store that have expired by the specified date.

Returns
  • true if any cookies were purged.

public abstract List<Cookie> getCookies ()

Since: API Level 1

Returns all cookies contained in this store.

Returns
  • all cookies