|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.http.Cookies
public final class Cookies
A collection of cookies - reusable and tuned for server side performance. Based on RFC2965 ( and 2109 ) This class is not synchronized.
Field Summary | |
---|---|
static boolean |
ALLOW_EQUALS_IN_VALUE
If true, cookie values are allowed to contain an equals character without being quoted. |
static int |
INITIAL_SIZE
|
static boolean |
PRESERVE_COOKIE_HEADER
If set to true, the cookie header will be preserved. |
protected static boolean[] |
separators
|
static char[] |
SEPARATORS
|
Constructor Summary | |
---|---|
Cookies()
Construct a new uninitialized cookie collection. |
|
Cookies(MimeHeaders headers)
Construct a new cookie collection, that will extract the information from headers. |
Method Summary | |
---|---|
ServerCookie |
addCookie()
Register a new, unitialized cookie. |
static boolean |
equals(java.lang.String s,
byte[] b,
int start,
int end)
|
ServerCookie |
getCookie(int idx)
|
int |
getCookieCount()
|
static int |
getQuotedValueEndPosition(byte[] bytes,
int off,
int end)
Given a starting position after an initial quote chracter, this gets the position of the end quote. |
static int |
getTokenEndPosition(byte[] bytes,
int off,
int end)
Deprecated. - Use private method getTokenEndPosition(byte[], int, int, boolean) instead |
static boolean |
isSeparator(byte c)
Returns true if the byte is a separator character as defined in RFC2619. |
static boolean |
isWhiteSpace(byte c)
Returns true if the byte is a whitespace character as defined in RFC2619 JVK |
void |
log(java.lang.String s)
|
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. |
void |
setHeaders(MimeHeaders headers)
Set the headers from which cookies will be pulled. |
void |
setLimit(int limit)
|
java.lang.String |
toString()
EXPENSIVE!!! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int INITIAL_SIZE
public static final boolean ALLOW_EQUALS_IN_VALUE
public static final boolean PRESERVE_COOKIE_HEADER
public static final char[] SEPARATORS
protected static final boolean[] separators
Constructor Detail |
---|
public Cookies(MimeHeaders headers)
headers
- Cookies are lazy-evaluated and will extract the
information from the provided headers.public Cookies()
setHeaders(org.apache.tomcat.util.http.MimeHeaders)
to initialize.
Method Detail |
---|
public void setLimit(int limit)
public void setHeaders(MimeHeaders headers)
headers
- Cookies are lazy-evaluated and will extract the
information from the provided headers.public void recycle()
public java.lang.String toString()
toString
in class java.lang.Object
public ServerCookie getCookie(int idx)
public int getCookieCount()
public ServerCookie addCookie()
public void processCookies(MimeHeaders headers)
public static boolean equals(java.lang.String s, byte[] b, int start, int end)
public void log(java.lang.String s)
public static final boolean isSeparator(byte c)
public static final boolean isWhiteSpace(byte c)
public final void processCookieHeader(byte[] bytes, int off, int len)
public static final int getTokenEndPosition(byte[] bytes, int off, int end)
getTokenEndPosition(byte[], int, int, boolean)
instead
public static final int getQuotedValueEndPosition(byte[] bytes, int off, int end)
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |