org.apache.tomcat.util.http
public final class Cookies extends Object
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 |
protected static boolean[] | separators |
static char[] | SEPARATORS |
Constructor Summary | |
---|---|
Cookies(MimeHeaders headers)
Construct a new cookie collection, that will extract
the information from headers.
| |
Cookies()
Construct a new uninitialized cookie collection.
|
Method Summary | |
---|---|
ServerCookie | addCookie() Register a new, unitialized cookie. |
static boolean | equals(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) |
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(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.
|
String | toString()
EXPENSIVE! |
Parameters: headers Cookies are lazy-evaluated and will extract the information from the provided headers.
Deprecated: - Use private method
(byte[], int, int, boolean)
instead
Parameters: headers Cookies are lazy-evaluated and will extract the information from the provided headers.