public class PersistentCookieStore extends Object implements org.apache.http.client.CookieStore
CookieStore interface. Cookies are stored and will persist on the
user's device between application sessions since they are serialized and
stored in SharedPreferences.
Instances of this class are designed to be used with
AsyncHttpClient#setCookieStore, but can also be used with a regular
old apache HttpClient/HttpContext if you prefer.
| Constructor and Description |
|---|
PersistentCookieStore(android.content.Context context)
Construct a persistent cookie store.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(org.apache.http.cookie.Cookie cookie) |
protected String |
byteArrayToHexString(byte[] b) |
void |
clear() |
boolean |
clearExpired(Date date) |
protected org.apache.http.cookie.Cookie |
decodeCookie(String cookieStr) |
protected String |
encodeCookie(SerializableCookie cookie) |
List<org.apache.http.cookie.Cookie> |
getCookies() |
protected byte[] |
hexStringToByteArray(String s) |
public PersistentCookieStore(android.content.Context context)
public void addCookie(org.apache.http.cookie.Cookie cookie)
addCookie in interface org.apache.http.client.CookieStorepublic void clear()
clear in interface org.apache.http.client.CookieStorepublic boolean clearExpired(Date date)
clearExpired in interface org.apache.http.client.CookieStorepublic List<org.apache.http.cookie.Cookie> getCookies()
getCookies in interface org.apache.http.client.CookieStoreprotected String encodeCookie(SerializableCookie cookie)
protected org.apache.http.cookie.Cookie decodeCookie(String cookieStr)
protected String byteArrayToHexString(byte[] b)
protected byte[] hexStringToByteArray(String s)
Copyright © 2015 Hannes Dorfmann. All rights reserved.