|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.teamdev.jxbrowser.cookies.CookieManager
public class CookieManager
Provide cookies support
Constructor Summary | |
---|---|
CookieManager()
Construct new cookie manager |
Method Summary | |
---|---|
java.util.Set<Cookie> |
getAllCookies()
|
int |
getCookiesCount(java.lang.String host)
Returns count of available cookies for a given host , ignoring the
cookie flags Cookie.isSecure() , and Cookie.isHttpOnly() . |
void |
importCookies(java.io.File cookieFile)
Import an old-style cookie file. |
void |
remove(java.lang.String domain,
java.lang.String name,
java.lang.String path,
boolean blocked)
Called to remove an individual cookie from the cookie list |
void |
removeAll()
Called to remove all cookies from the cookie list (e.g clear cookies) |
void |
setCookie(Cookie cookie)
Adds new cookie object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CookieManager()
Method Detail |
---|
public void setCookie(Cookie cookie)
cookie
- the cookie object.Cookie
public void importCookies(java.io.File cookieFile)
cookieFile
- the file to import, usually cookies.txtpublic int getCookiesCount(java.lang.String host)
host
, ignoring the
cookie flags Cookie.isSecure()
, and Cookie.isHttpOnly()
.
Thus, for a host "weather.yahoo.com", host or domain cookies for
"weather.yahoo.com" and "yahoo.com" would be counted, while a cookie for
"my.weather.yahoo.com" would not.
host
- the host string to look for, e.g. "google.com". this should
consist of only the host portion of a URI, and should not
contain a leading dot, a port, etc.
host
.public void remove(java.lang.String domain, java.lang.String name, java.lang.String path, boolean blocked)
domain
- the host or domain for which the cookie was setname
- the name specified in the cookiepath
- path within the domain for which the cookie is validblocked
- Indicates if cookies from this host should be permanently
blockedpublic java.util.Set<Cookie> getAllCookies()
public void removeAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |