Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
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)

Added in 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 ()

Added in API level 1

Clears all cookies.

public abstract boolean clearExpired ( Date date)

Added in 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 ()

Added in API level 1

Returns all cookies contained in this store.

Returns
  • all cookies