Cookie header parser based on RFC6265
The parsing of cookies using RFC6265 is more relaxed that the specification in the following ways:
Implementation note:
This class has been carefully tuned.
| Modifier and Type | Class and Description |
|---|---|
| private static class | CookieHeaderParser.
Custom implementation that skips many of the safety checks in
|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final byte | |
| private static final byte | |
| private static final byte[] | |
| private static final byte | |
| private static final boolean[] | |
| private static final boolean[] | |
| private static final boolean[] | |
| private static final boolean[] | |
| private static final boolean[] | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte | |
| private static final byte |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static boolean | |
| public static void | |
| private static CookieHeaderParser. | readCookieValueRfc6265(CookieHeaderParser.
Similar to readCookieValue() but treats a comma as part of an invalid value. |
| private static CookieHeaderParser. | |
| private static CookieHeaderParser. | |
| private static void | |
| private static void |
| ARRAY_SIZE | back to summary |
|---|---|
| private static final int ARRAY_SIZE | |
| COMMA_BYTE | back to summary |
|---|---|
| private static final byte COMMA_BYTE | |
| DEL_BYTE | back to summary |
|---|---|
| private static final byte DEL_BYTE | |
| EMPTY_BYTES | back to summary |
|---|---|
| private static final byte[] EMPTY_BYTES | |
| EQUALS_BYTE | back to summary |
|---|---|
| private static final byte EQUALS_BYTE | |
| IS_CONTROL | back to summary |
|---|---|
| private static final boolean[] IS_CONTROL | |
| IS_SEPARATOR | back to summary |
|---|---|
| private static final boolean[] IS_SEPARATOR | |
| IS_TOKEN | back to summary |
|---|---|
| private static final boolean[] IS_TOKEN | |
| isCookieOctet | back to summary |
|---|---|
| private static final boolean[] isCookieOctet | |
| isText | back to summary |
|---|---|
| private static final boolean[] isText | |
| QUOTE_BYTE | back to summary |
|---|---|
| private static final byte QUOTE_BYTE | |
| SEMICOLON_BYTE | back to summary |
|---|---|
| private static final byte SEMICOLON_BYTE | |
| SLASH_BYTE | back to summary |
|---|---|
| private static final byte SLASH_BYTE | |
| SPACE_BYTE | back to summary |
|---|---|
| private static final byte SPACE_BYTE | |
| TAB_BYTE | back to summary |
|---|---|
| private static final byte TAB_BYTE | |
| CookieHeaderParser | back to summary |
|---|---|
| private CookieHeaderParser() | |
| isText | back to summary |
|---|---|
| public static boolean isText(int c) | |
| isToken | back to summary |
|---|---|
| public static boolean isToken(int c) | |
| parseCookie | back to summary |
|---|---|
| public static void parseCookie(byte[] bytes, int offset, int len, Cookies serverCookies) | |
| readCookieValueRfc6265 | back to summary |
|---|---|
| private static CookieHeaderParser. Similar to readCookieValue() but treats a comma as part of an invalid value. | |
| readToken | back to summary |
|---|---|
| private static CookieHeaderParser. | |
| skipByte | back to summary |
|---|---|
| private static CookieHeaderParser. | |
| skipUntilSemiColon | back to summary |
|---|---|
| private static void skipUntilSemiColon(CookieHeaderParser. | |
| skipWhiteSpace | back to summary |
|---|---|
| private static void skipWhiteSpace(CookieHeaderParser. | |
java.nio.ByteBuffer .
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| public byte | |
| public boolean | |
| public int | |
| public int | |
| public void | |
| public int | |
| public void | |
| public String |
| bytes | back to summary |
|---|---|
| private final byte[] bytes | |
| limit | back to summary |
|---|---|
| private int limit | |
| position | back to summary |
|---|---|
| private int position | |
| ByteBuffer | back to summary |
|---|---|
| public ByteBuffer(byte[] bytes, int offset, int len) | |
| array | back to summary |
|---|---|
| public byte[] array() | |
| get | back to summary |
|---|---|
| public byte get() | |
| hasRemaining | back to summary |
|---|---|
| public boolean hasRemaining() | |
| limit | back to summary |
|---|---|
| public int limit() | |
| position | back to summary |
|---|---|
| public int position() | |
| position | back to summary |
|---|---|
| public void position(int position) | |
| remaining | back to summary |
|---|---|
| public int remaining() | |
| rewind | back to summary |
|---|---|
| public void rewind() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final CookieHeaderParser. | |
| public static final CookieHeaderParser. | |
| public static final CookieHeaderParser. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CookieHeaderParser. | |
| public static CookieHeaderParser. |
| EOF | back to summary |
|---|---|
| public static final CookieHeaderParser. | |
| FOUND | back to summary |
|---|---|
| public static final CookieHeaderParser. | |
| NOT_FOUND | back to summary |
|---|---|
| public static final CookieHeaderParser. | |
| SkipResult | back to summary |
|---|---|
| private SkipResult() | |
| valueOf | back to summary |
|---|---|
| public static CookieHeaderParser. | |
| values | back to summary |
|---|---|
| public static CookieHeaderParser. | |