|
EAF 7.4 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lutris.http.HttpCookieParser
public class HttpCookieParser
This class takes a cookie header and converts it into a set of http cookies. It can be used to parse request and response cookie headers as well as format response cookies.
Constructor Summary | |
---|---|
HttpCookieParser()
|
Method Summary | |
---|---|
static int |
expiresToMaxAge(java.lang.String dateStr)
Convert an old cookie expires data to maximum age; assuming now as the start. |
static java.lang.String |
formatResponseCookie(javax.servlet.http.Cookie cookie)
Format a Cookie for a response header. |
static java.lang.String |
maxAgeToExpires(int maxAge)
Convert amaximum age to a old cookie expires data; assuming now as the start. |
static javax.servlet.http.Cookie |
parseCookieString(java.lang.String cookieString)
|
static java.util.Vector |
parseRequestHeader(java.lang.String httpReqCookieHeader)
Parses an http cookie request header and returns a vector of Cookie objects defined in the header. |
static javax.servlet.http.Cookie |
parseRequestHeader(java.lang.String httpReqCookieHeader,
java.lang.String name)
Parses an http cookie request header and returns the first cookie that matches the specified name. |
static java.util.Vector |
parseResponseHeader(java.lang.String httpResponseCookieHeader)
Parses an http cookie response header and returns a vector of Cookie objects defined in the header. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpCookieParser()
Method Detail |
---|
public static java.util.Vector parseRequestHeader(java.lang.String httpReqCookieHeader)
httpReqCookieHeader
- The http cookie request header to parse.
public static javax.servlet.http.Cookie parseRequestHeader(java.lang.String httpReqCookieHeader, java.lang.String name)
httpReqCookieHeader
- The http cookie request header to parse.name
- The cookie name of interest.
public static int expiresToMaxAge(java.lang.String dateStr)
dateStr
- The string expiry date.
public static java.lang.String maxAgeToExpires(int maxAge)
The
- max age, in seconds.
public static java.util.Vector parseResponseHeader(java.lang.String httpResponseCookieHeader)
httpResponseCookieHeader
- The http cookie response header from which the cookies
are constructed.
public static javax.servlet.http.Cookie parseCookieString(java.lang.String cookieString)
public static java.lang.String formatResponseCookie(javax.servlet.http.Cookie cookie)
The
- cookie to format.
|
EAF 7.4 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |