public class Cookie
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
RAW_COOKIE_DELIMITER |
protected static java.lang.String |
RAW_COOKIE_SPLIT_DELIMITER |
Constructor and Description |
---|
Cookie() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatCookie(java.lang.String[] values)
Formats the given values to a session cookie value.
|
static <E> E |
getCookie(java.lang.Class<E> eClass,
javax.servlet.http.HttpServletRequest request,
java.lang.String cookieName)
Gets the cookie from the given http request.
|
protected static final java.lang.String RAW_COOKIE_DELIMITER
protected static final java.lang.String RAW_COOKIE_SPLIT_DELIMITER
public static java.lang.String formatCookie(java.lang.String[] values)
values
- The values to format.public static <E> E getCookie(java.lang.Class<E> eClass, javax.servlet.http.HttpServletRequest request, java.lang.String cookieName)
E
- The required cookie type.eClass
- The required cookie type.request
- THe http request to get the cookies from.cookieName
- The cookie name.