java.lang.Object | |
↳ | android.webkit.CookieManager |
Manages the cookies used by an application's
WebView
instances.
Cookies are manipulated according to RFC2109.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Gets whether the application's
WebView
instances send and accept
cookies.
|
||||||||||
|
Gets whether the application's
WebView
instances send and accept
cookies for file scheme URLs.
|
||||||||||
|
Gets the cookies for the given URL.
|
||||||||||
|
Gets the singleton CookieManager instance.
|
||||||||||
|
Gets whether there are stored cookies.
|
||||||||||
|
Removes all cookies.
|
||||||||||
|
Removes all expired cookies.
|
||||||||||
|
Removes all session cookies, which are cookies without an expiration
date.
|
||||||||||
|
Sets whether the application's
WebView
instances should send and
accept cookies.
|
||||||||||
|
Sets whether the application's
WebView
instances should send and
accept cookies for file scheme URLs.
|
||||||||||
|
Sets a cookie for the given URL.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Creates and returns a copy of this
Object
.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Gets the cookies for the given URL.
url | the URL for which the cookies are requested |
---|
Gets the singleton CookieManager instance. If this method is used
before the application instantiates a
WebView
instance,
CookieSyncManager.createInstance(Context)
must be called first.
Gets whether there are stored cookies.
Removes all session cookies, which are cookies without an expiration date.
Sets whether the application's
WebView
instances should send and
accept cookies for file scheme URLs.
Use of cookies with file scheme URLs is potentially insecure. Do not use
this feature unless you can be sure that no unintentional sharing of
cookie data can take place.
Note that calls to this method will have no effect if made after a
WebView
or CookieManager instance has been created.
Sets a cookie for the given URL. Any existing cookie with the same host, path and name will be replaced with the new cookie. The cookie being set must not have expired and must not be a session cookie, otherwise it will be ignored.
url | the URL for which the cookie is set |
---|---|
value | the cookie as a string, using the format of the 'Set-Cookie' HTTP response header |
Creates and returns a copy of this
Object
. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call
super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.
CloneNotSupportedException |
---|