Class Cookies
- java.lang.Object
-
- org.apache.wicket.protocol.http.mock.Cookies
-
public final class Cookies extends java.lang.ObjectA helper class for dealing with cookies
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCookies.Key
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.servlet.http.CookiecopyOf(javax.servlet.http.Cookie cookie)Make a copy of the passed cookie.static booleanisEqual(javax.servlet.http.Cookie c1, javax.servlet.http.Cookie c2)Checks whether two cookies are equal.static booleanisExpired(javax.servlet.http.Cookie cookie)detect if this cookie is expiredstatic Cookies.KeykeyOf(javax.servlet.http.Cookie cookie)creates a key based on the property for cookie equality
-
-
-
Method Detail
-
copyOf
public static javax.servlet.http.Cookie copyOf(javax.servlet.http.Cookie cookie)
Make a copy of the passed cookie.- Parameters:
cookie- The cookie to copy- Returns:
- A copy of the passed cookie. May be
nullif the argument isnull.
-
keyOf
public static Cookies.Key keyOf(javax.servlet.http.Cookie cookie)
creates a key based on the property for cookie equality- Parameters:
cookie- cookie- Returns:
- key
-
isEqual
public static boolean isEqual(javax.servlet.http.Cookie c1, javax.servlet.http.Cookie c2)Checks whether two cookies are equal. See http://www.ietf.org/rfc/rfc2109.txt, p.4.3.3- Parameters:
c1- the first cookiec2- the second cookie- Returns:
trueonly if the cookies have the same name, path and domain
-
isExpired
public static boolean isExpired(javax.servlet.http.Cookie cookie)
detect if this cookie is expired- Parameters:
cookie-- Returns:
-
-