com.sonalb.net.http.cookie
Class CookieUtils
java.lang.Object
|
+--com.sonalb.net.http.cookie.CookieUtils
- public final class CookieUtils
- extends Object
Provides utility functions for internal consumption.
- Author:
- Sonal Bansal
CookieUtils
public CookieUtils()
getCookiesForURL
public static CookieJar getCookiesForURL(CookieJar cj,
CookieParser cp,
URL url,
boolean bRespectExpires)
- Picks out the
Cookie
s in a CookieJar
that are eligible
to be sent with a request to a particular URL
.
- Parameters:
cj
- the CookieJar holding the Cookiescp
- the CookieParser which determines whether each Cookie can be sent with given URLurl
- the URL for which Cookies have to be picked outbRespectExpires
- whether the lifetime of the Cookies should be taken into consideration- Returns:
- the CookieJar with eligible Cookies; always non-null