org.apache.tomcat.util.http
Class Cookies

java.lang.Object
  extended by org.apache.tomcat.util.http.Cookies

public final class Cookies
extends java.lang.Object

A collection of cookies - reusable and tuned for server side performance. Based on RFC2965 ( and 2109 ) This class is not synchronized.

Author:
Costin Manolache, kevin seguin

Field Summary
static int INITIAL_SIZE
           
 
Constructor Summary
Cookies(MimeHeaders headers)
          Construct a new cookie collection, that will extract the information from headers.
 
Method Summary
 ServerCookie getCookie(int idx)
           
 int getCookieCount()
           
protected  void processCookieHeader(byte[] bytes, int off, int len)
          Parses a cookie header after the initial "Cookie:" [WS][$]token[WS]=[WS](token|QV)[;|,] RFC 2965 JVK
 void processCookies(MimeHeaders headers)
          Add all Cookie found in the headers of a request.
 void recycle()
          Recycle.
 java.lang.String toString()
          EXPENSIVE!!!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INITIAL_SIZE

public static final int INITIAL_SIZE
See Also:
Constant Field Values
Constructor Detail

Cookies

public Cookies(MimeHeaders headers)
Construct a new cookie collection, that will extract the information from headers.

Parameters:
headers - Cookies are lazy-evaluated and will extract the information from the provided headers.
Method Detail

recycle

public void recycle()
Recycle.


toString

public java.lang.String toString()
EXPENSIVE!!! only for debugging.

Overrides:
toString in class java.lang.Object

getCookie

public ServerCookie getCookie(int idx)

getCookieCount

public int getCookieCount()

processCookies

public void processCookies(MimeHeaders headers)
Add all Cookie found in the headers of a request.


processCookieHeader

protected final void processCookieHeader(byte[] bytes,
                                         int off,
                                         int len)
Parses a cookie header after the initial "Cookie:" [WS][$]token[WS]=[WS](token|QV)[;|,] RFC 2965 JVK



Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.