jCookie v0.8b

com.sonalb.net.http.cookie
Interface CookieParser

All Known Implementing Classes:
RFC2965CookieParser

public interface CookieParser

Interface definition for cookie-parsing and specification implementations.

Author:
Sonal Bansal
See Also:
Client.setCookieParser(CookieParser)

Method Summary
 boolean allowedCookie(Cookie c, URL url)
          Checks whether a request to the given URL is allowed to return the specified Cookie.
 Header getCookieHeaders(CookieJar cj)
          Converts the Cookies in the CookieJar to a set of headers suitable to be sent along with an HTTP request.
 CookieJar parseCookies(Header h, URL url)
          Converts the headers in an HTTP response into a CookieJar of Cookie objects.
 boolean sendCookieWithURL(Cookie c, URL url, boolean bRespectExpires)
          Checks whether the given Cookie can be sent alongwith a request for the given URL.
 

Method Detail

getCookieHeaders

public Header getCookieHeaders(CookieJar cj)
Converts the Cookies in the CookieJar to a set of headers suitable to be sent along with an HTTP request.

allowedCookie

public boolean allowedCookie(Cookie c,
                             URL url)
Checks whether a request to the given URL is allowed to return the specified Cookie.

parseCookies

public CookieJar parseCookies(Header h,
                              URL url)
                       throws MalformedCookieException
Converts the headers in an HTTP response into a CookieJar of Cookie objects.

sendCookieWithURL

public boolean sendCookieWithURL(Cookie c,
                                 URL url,
                                 boolean bRespectExpires)
Checks whether the given Cookie can be sent alongwith a request for the given URL.

Copyright (c) 2001-2002 Sonal Bansal