| public interface java.net CookieStore
|
Java SE 6 |
CookieManager will call CookieStore.add to save cookies
for every incoming HTTP response, and call CookieStore.get to
retrieve cookie for every outgoing HTTP request. A CookieStore
is responsible for removing HttpCookie instances which have expired.
| version | 1.3, 05/11/17 |
| since | 1.6 |
| Methods | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| public void | add(URI uri, HttpCookie cookie) Details
Adds one HTTP cookie to the store. This is called for every
incoming HTTP response.
A cookie to store may or may not be associated with an URI. If it is not associated with an URI, the cookie's domain and path attribute will indicate where it comes from. If it is associated with an URI and its domain and path attribute are not speicifed, 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.
| ||||||||
| public List | get(URI uri) Details
Retrieve cookies associated with given URI, or whose domain matches the
given URI. Only cookies that have not expired are returned.
This is called for every outgoing HTTP request.
| ||||||||
| public boolean | remove(URI uri, HttpCookie cookie) Details
Remove a cookie from store.
| ||||||||
| public boolean | removeAll() Details
Remove all cookies in this cookie store.
| ||||||||
| Properties | |||
|---|---|---|---|
| public List | getCookies() Details
Get all not-expired cookies in cookie store.
| ||
| public List | getURIs() Details
Get all URIs which identify the cookies in this cookie store.
| ||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|