Android APIs
Added in API level 1
public interface

CookieStore

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

This interface is deprecated.
Please use openConnection() instead. Please visit this webpage for further details.

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