Object
CookieHandler
StaticCookieHandler
Static cookie handler with predefined set of cookies which cannot be changed. Requests to add new
cookies are ignored.
-
Constructor Summary
ConstructorDescriptionStaticCookieHandler
(String cookies) Creates cookie manager with given cookies.StaticCookieHandler
(List<String> cookies) Creates cookie manager with given list of cookies. -
Method Summary
Methods inherited from class CookieHandler
getDefault, setDefault
-
Constructor Details
-
StaticCookieHandler
Creates cookie manager with given cookies.- Parameters:
cookies
- string of cookies in format "name=value; name=value; ...; name=value"
-
StaticCookieHandler
Creates cookie manager with given list of cookies.- Parameters:
cookies
- list of cookies where each cookie in format "name=value"
-
-
Method Details
-
get
public Map<String,List<String>> get(URI uri, Map<String, List<String>> requestHeaders) throws IOException- Specified by:
get
in classCookieHandler
- Throws:
IOException
-
put
- Specified by:
put
in classCookieHandler
- Throws:
IOException
-