org.enhydra.barracuda.plankton.http
Class HttpServices
java.lang.Object
org.enhydra.barracuda.plankton.http.HttpServices
- public class HttpServices
- extends Object
This class provides HTTP-related utility methods.
- Author:
- shawn@shawn-wilson.com
Method Summary |
static String |
formatCookie(javax.servlet.http.Cookie cookie)
Return a formatted cookie string for use in a 'Set-Cookie' header. |
static javax.servlet.http.Cookie |
getCookie(String cookieName,
javax.servlet.http.HttpServletRequest req)
Convenience method to get a cookie by name from an HttpServletRequest |
static javax.servlet.http.Cookie |
parseCookie(String str)
Return a Cookie from a single 'Set-Cookie' header value string from the server.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cookieDF
protected static final DateFormat cookieDF
HttpServices
public HttpServices()
parseCookie
public static javax.servlet.http.Cookie parseCookie(String str)
throws ParseException
- Return a Cookie from a single 'Set-Cookie' header value string from the server.
The value string must conform to either the Version 0 (by Netscape) or Version 1
(by RFC 2109) cookie specification.
- Throws:
ParseException
- if the string cannot be parsed into a valid cookie- See Also:
- Cookie Specification, Version 0,
Cookie Specification, Version 1
formatCookie
public static String formatCookie(javax.servlet.http.Cookie cookie)
- Return a formatted cookie string for use in a 'Set-Cookie' header.
getCookie
public static javax.servlet.http.Cookie getCookie(String cookieName,
javax.servlet.http.HttpServletRequest req)
- Convenience method to get a cookie by name from an HttpServletRequest
Copyright © 2003 BarracudaMVC.org All Rights Reserved.