org.gwtwidgets.client.util
Class CookieUtils

java.lang.Object
  extended by org.gwtwidgets.client.util.CookieUtils

public class CookieUtils
extends java.lang.Object

Class that is responsible for reading and writing cookies.

Author:
Brian Glick, rhanson

Constructor Summary
CookieUtils()
           
 
Method Summary
static void erase(Cookie c)
          Erase the given cookie
static void erase(java.lang.String name)
          Erases cookie with given name.
static Cookie[] getAll()
           
static Cookie read(java.lang.String name)
          Gets the cookie with the given name.
static java.lang.String readValue(java.lang.String name)
          Gets the value of the cookie with the given name.
static void write(Cookie c, java.util.Date expires)
          Write the given cookie
static Cookie write(java.lang.String name, java.lang.String value, java.util.Date expires)
           
static Cookie write(java.lang.String name, java.lang.String value, java.util.Date expires, java.lang.String path)
          Creates, sets, and returns the Cookie object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieUtils

public CookieUtils()
Method Detail

write

public static Cookie write(java.lang.String name,
                           java.lang.String value,
                           java.util.Date expires,
                           java.lang.String path)
Creates, sets, and returns the Cookie object

Parameters:
name -
value -
expires -
path -
Returns:
the Cookie created or reset

write

public static Cookie write(java.lang.String name,
                           java.lang.String value,
                           java.util.Date expires)

erase

public static void erase(java.lang.String name)
Erases cookie with given name.

Parameters:
name -

readValue

public static java.lang.String readValue(java.lang.String name)
Gets the value of the cookie with the given name.

Parameters:
name - Name of cookie whose value should be retrieved
Returns:
Cookie value or null if cookie is not found

read

public static Cookie read(java.lang.String name)
Gets the cookie with the given name.

Parameters:
name - Name of cookie to get.
Returns:
Cookie or null if the cookie is not found.

erase

public static void erase(Cookie c)
Erase the given cookie

Parameters:
c -

write

public static void write(Cookie c,
                         java.util.Date expires)
Write the given cookie

Parameters:
c -

getAll

public static Cookie[] getAll()


Copyright © 2009. All Rights Reserved.