java.net.CookieStore |
A CookieStore object is a repository for cookies. CookieManager will store cookies of every incoming HTTP response into CookieStore, and retrieve cookies for every outgoing HTTP request.Expired HttpCookies should be removed from this store by themselves.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Saves a HTTP cookie to this store.
|
||||||||||
|
Retrieves cookies that match the specified URI.
|
||||||||||
|
Get all cookies in cookie store which are not expired.
|
||||||||||
|
Get a set of URIs, which is composed of associated URI with all the
cookies in the store.
|
||||||||||
|
Remove the specified cookie from the store.
|
||||||||||
|
Clear this cookie store.
|
Saves a HTTP cookie to this store. This is called for every incoming HTTP response. A cookie may or may not has an associated URI. If not, the cookie's domain and path attribute will show cradleland. If there is an associated URI and no domain and path attribute are speicifed for the cookie, the given URI will indicate where this cookie comes from. If a cookie corresponding to the given URI already exists, then it is replaced with the new one.
uri | the uri associated with the specified cookie. A null value indicates the cookie is not associated with a URI |
---|---|
cookie | the cookie to be stored |
Retrieves cookies that match the specified URI. Return not expired cookies. For every outgoing HTTP request, this method will be called.
uri | the uri this cookie associated with. If null, this cookie will not be associated with an URI |
---|
NullPointerException | if uri is null |
---|
Get all cookies in cookie store which are not expired.
Get a set of URIs, which is composed of associated URI with all the cookies in the store.
Remove the specified cookie from the store.
uri | the uri associated with the specified cookie. If the cookie is not associated with an URI when added, uri should be null; otherwise the uri should be non-null. |
---|---|
cookie | the cookie to be removed |
Clear this cookie store.