java.net
public
abstract
class
java.net.CookieHandler
This class is ready for managing a stateful cookie with HTTP protocol
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
Public Methods
Searchs and gets all cookies in the cache by the specified uri in the
request header.
Parameters
uri
| the specified uri to search for |
requestHeaders
| a list of request headers |
Returns
- a map that record all such cookies, the map is unchangeable
public
static
CookieHandler
getDefault()
Returns a system-wide cookie handler, or null if not set
public
abstract
void
put(URI uri, Map<String, List<String>> responseHeaders)
Sets cookies according to uri and responseHeaders
Parameters
uri
| the specified uri |
responseHeaders
| a list of request headers |
public
static
void
setDefault(CookieHandler cHandler)
sets a system-wide cookie handler
Parameters
cHandler
| the cookie handler to set
|