org.encog.util.http
Class CookieUtility
- java.lang.Object
-
- org.encog.util.http.CookieUtility
-
public class CookieUtility extends java.lang.ObjectThis class allows URLConnection objects to process cookies. The loadCookies method grabs the Set-Cookie headers and loads the cookies into the map. The saveCookies method writes out the cookie map to the a URLConnection object as Cookie headers.
-
-
Constructor Summary
Constructors Constructor and Description CookieUtility()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Map<java.lang.String,java.lang.String>getMap()Allows access to the name/value pair list of cookies.voidloadCookies(java.net.URLConnection http)Load any cookies from the specified URLConnection object.voidsaveCookies(java.net.URLConnection http)Once you have loaded cookies with loadCookies, you can call saveCookies to copy these cookies to a new HTTP request.
-
-
-
Method Detail
-
getMap
public java.util.Map<java.lang.String,java.lang.String> getMap()
Allows access to the name/value pair list of cookies.- Returns:
- the map
-
loadCookies
public void loadCookies(java.net.URLConnection http)
Load any cookies from the specified URLConnection object. Cookies will be located by their Set-Cookie headers. Any cookies that are found can be moved to a new URLConnection class by calling saveCookies.- Parameters:
http- The URLConnection object to load the cookies from.
-
saveCookies
public void saveCookies(java.net.URLConnection http)
Once you have loaded cookies with loadCookies, you can call saveCookies to copy these cookies to a new HTTP request. This allows you to easily support cookies.- Parameters:
http- The URLConnection object to add cookies to.
-
-
DMelt 3.0 © DataMelt by jWork.ORG