|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.win32.ie.cookie.CookieManager
The class allows working with persistent or session cookies.
The all persistent cookies stored in the windows\cookies directory and have an expiration date set sometime in the future.
The session cookies do not have an an expiration date and created in the same process. These cookies are not written to any files.
| Method Summary | |
void |
deleteAllPersistentCookies()
Removes all persistent cookies. |
void |
deleteCookie(java.net.URL domain,
Cookie cookie)
Deletes persistent or session cookie. |
void |
deletePersistentCookie(Cookie cookie)
Removes specified persistent cookie. |
java.util.Set |
getCookies(java.net.URL url)
Returns cookies, that are associated with the specified URL. |
static CookieManager |
getInstance()
|
java.util.Set |
getPersistentCookies()
Returns the all persistent cookies stored in the windows\cookies directory and that have an expiration date set sometime in the future. |
void |
setCookie(java.net.URL url,
Cookie cookie)
Creates a new cookies for the specified URL using WinINet API. |
void |
setCookies(java.net.URL url,
java.util.Set cookies)
Creates a new cookies for the specified URL using WinINet API. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static CookieManager getInstance()
public java.util.Set getPersistentCookies()
public java.util.Set getCookies(java.net.URL url)
InternetGetCookie native function.
It checks in the windows\cookies directory for persistent cookies that have an expiration date set sometime in the future.
It also searches memory for any session cookies, that is, cookies that do not have an expiration date that were created in the same process by CookieManager.setCookie(), because these cookies are not written to any files. Rules for creating cookie files are internal to the system and can change in the future.
Note: The method does not return cookies that the server marked as non-scriptable with the "HttpOnly" attribute in the Set-Cookie header.
url - specifies an URL.
public void setCookies(java.net.URL url,
java.util.Set cookies)
InternetSetCookie native function.
Cookies created by this method without an expiration date are stored in memory and are available only in the same process that created them. Cookies that include an expiration date are stored in the windows\cookies directory.
url - specifies an URL, a new cookie will be associated with.cookies - the collection of Cookie objects.
public void setCookie(java.net.URL url,
Cookie cookie)
InternetSetCookie native function.
Cookies created by this method without an expiration date are stored in memory and are available only in the same process that created them. Cookies that include an expiration date are stored in the windows\cookies directory.
url - specifies an URL, a new cookie will be associated with.cookie - specifies a new cookie.public void deletePersistentCookie(Cookie cookie)
cookie - specified persistent cookie.public void deleteAllPersistentCookies()
public void deleteCookie(java.net.URL domain,
Cookie cookie)
domain - the domain of this cookie.cookie - the cookie to delete.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||