| java.lang.Object edu.indiana.lib.twinpeaks.util.CookieUtils
CookieUtils | public class CookieUtils (Code) | | |
Method Summary | |
public static List | findCookiesForServer(List cookieList, URL url) | public static List | getCookies(List cookieList, URL url, String name, boolean exact) | public static List | getCookiesByName(List cookieList, URL url, String name) | public static List | getCookiesByPrefix(List cookieList, URL url, String name) | public static boolean | inDomain(String urlString, CookieData cookie) | public static boolean | inDomain(URL url, CookieData cookie) | public static boolean | inPath(String urlString, CookieData cookie) | public static boolean | inPath(URL url, CookieData cookie) | public static List | newCookieList() | public static CookieData | parseCookie(URL url, String value) | public static void | storeCookie(List cookieList, CookieData cookie) |
findCookiesForServer | public static List findCookiesForServer(List cookieList, URL url)(Code) | | Find all stored cookies which associated with this server
Parameters: cookieList - List of stored cookies (CookieData objects) Parameters: url - URL representing the request to lookup (server) A List of associated cookies |
getCookies | public static List getCookies(List cookieList, URL url, String name, boolean exact)(Code) | | Find cookies associated with this server (by name)
Parameters: cookieList - List of stored cookies (CookieData objects) Parameters: url - URL representing the request to lookup (server) Parameters: name - Cookie name Parameters: exact - true for exact name match, false to match on name prefix A List of associated cookies |
getCookiesByName | public static List getCookiesByName(List cookieList, URL url, String name)(Code) | | Find cookies associated with this server (exact name match)
Parameters: cookieList - List of stored cookies (CookieData objects) Parameters: url - URL representing the request to lookup (server) Parameters: name - Cookie name A List of associated cookies |
getCookiesByPrefix | public static List getCookiesByPrefix(List cookieList, URL url, String name)(Code) | | Find cookies associated with this server (match on name "prefix")
Parameters: cookieList - List of stored cookies (CookieData objects) Parameters: url - URL representing the request to lookup (server) Parameters: name - Cookie name A List of associated cookies |
inDomain | public static boolean inDomain(String urlString, CookieData cookie)(Code) | | Does the cookie domain match the URL?
Parameters: urlString - URL String to match Parameters: cookie - CookieData object (the cookie) true if the cookie domain matches the URL |
inDomain | public static boolean inDomain(URL url, CookieData cookie)(Code) | | Does the cookie domain match the URL?
Parameters: url - URL to match Parameters: cookie - CookieData object (the cookie) true if the cookie domain matches the URL |
inPath | public static boolean inPath(String urlString, CookieData cookie)(Code) | | Does the cookie path match the URL "file"?
Parameters: urlString - String URL to match Parameters: cookie - CookieData object (the cookie) true if the cookie domain matches the URL |
inPath | public static boolean inPath(URL url, CookieData cookie)(Code) | | Does the cookie path match the URL "file"?
Parameters: url - URL to match Parameters: cookie - CookieData object (the cookie) true if the cookie domain matches the URL |
newCookieList | public static List newCookieList()(Code) | | Get a new (empty) CookieData list
return An empty ArrayList
|
parseCookie | public static CookieData parseCookie(URL url, String value)(Code) | | Parse an HTTP cookie
Parameters: value - Cookie value A CookieData object representing this cookie |
storeCookie | public static void storeCookie(List cookieList, CookieData cookie)(Code) | | Maintain a list of CookieData objects (add, replace, or delete a cookie)
Parameters: cookieList - CookieData list Parameters: cookie - A CookieData object |
|
|