Methods Summary |
---|
public abstract java.util.Map | get(java.net.URI uri, java.util.Map requestHeaders)Gets all the applicable cookies from a cookie cache for the
specified uri in the request header.
HTTP protocol implementers should make sure that this method is
called after all request headers related to choosing cookies
are added, and before the request is sent.
|
public static synchronized java.net.CookieHandler | getDefault()Gets the system-wide cookie handler.
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(SecurityConstants.GET_COOKIEHANDLER_PERMISSION);
}
return cookieHandler;
|
public abstract void | put(java.net.URI uri, java.util.Map responseHeaders)Sets all the applicable cookies, examples are response header
fields that are named Set-Cookie2, present in the response
headers into a cookie cache.
|
public static synchronized void | setDefault(java.net.CookieHandler cHandler)Sets (or unsets) the system-wide cookie handler.
Note: non-standard http protocol handlers may ignore this setting.
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(SecurityConstants.SET_COOKIEHANDLER_PERMISSION);
}
cookieHandler = cHandler;
|