public abstract class CookieHandler extends Object
| Constructor and Description |
|---|
CookieHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract Map<String,List<String>> |
get(URI uri,
Map<String,List<String>> requestHeaders)
Gets all cookies for a specific URI from the cookie cache.
|
static CookieHandler |
getDefault()
Returns the system-wide cookie handler or
null if not set. |
abstract void |
put(URI uri,
Map<String,List<String>> responseHeaders)
Sets all cookies of a specific URI in the
responseHeaders into
the cookie cache. |
static void |
setDefault(CookieHandler cHandler)
Sets the system-wide cookie handler.
|
public static CookieHandler getDefault()
null if not set.public static void setDefault(CookieHandler cHandler)
public abstract Map<String,List<String>> get(URI uri, Map<String,List<String>> requestHeaders) throws IOException
uri - a URI to search for applicable cookies.requestHeaders - a list of request headers.IOException - if an error occurs during the I/O operation.public abstract void put(URI uri, Map<String,List<String>> responseHeaders) throws IOException
responseHeaders into
the cookie cache.uri - the origin URI of the cookies.responseHeaders - a list of request headers.IOException - if an error occurs during the I/O operation.