// ExampleHttpRequestreq = ...; res.setHeader("Cookie",ClientCookieEncoder.encode("JSESSIONID", "1234"));
ClientCookieDecoder
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Comparator | COOKIE_COMPARATOR
Sort cookies into decreasing order of path length, breaking ties by sorting into increasing chronological order of creation time, as recommended by RFC 6265. |
| public static final ClientCookieEncoder | LAX
Lax instance that doesn't validate name and value, and (for methods that accept multiple cookies) keeps cookies in the order in which they were given. |
| public static final ClientCookieEncoder | STRICT
Strict encoder that validates that name and value chars are in the valid scope and (for methods that accept multiple cookies) sorts cookies into order of decreasing path length, as specified in RFC6265. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | |
| public String | |
| public String | Returns: a Rfc6265 style Cookie header value, null if no cookies are passed.some cookies cookies)Encodes the specified cookies into a single Cookie header value. |
| public String | |
| private void |
| COOKIE_COMPARATOR | back to summary |
|---|---|
| pack-priv static final Comparator<Cookie> COOKIE_COMPARATOR Sort cookies into decreasing order of path length, breaking ties by sorting into increasing chronological order of creation time, as recommended by RFC 6265. | |
| LAX | back to summary |
|---|---|
| public static final ClientCookieEncoder LAX Lax instance that doesn't validate name and value, and (for methods that accept multiple cookies) keeps cookies in the order in which they were given. | |
| STRICT | back to summary |
|---|---|
| public static final ClientCookieEncoder STRICT Strict encoder that validates that name and value chars are in the valid scope and (for methods that accept multiple cookies) sorts cookies into order of decreasing path length, as specified in RFC6265. | |
| ClientCookieEncoder | back to summary |
|---|---|
| private ClientCookieEncoder(boolean strict) | |
| encode | back to summary |
|---|---|
| public String encode(String name, String value) Encodes the specified cookie into a Cookie header value. | |
| encode | back to summary |
|---|---|
| public String encode(Cookie cookie) Encodes the specified cookie into a Cookie header value. | |
| encode | back to summary |
|---|---|
| public String encode(Cookie... cookies) Encodes the specified cookies into a single Cookie header value. | |
| encode | back to summary |
|---|---|
| public String encode(Collection<? extends Cookie> cookies) Encodes the specified cookies into a single Cookie header value.
| |
| encode | back to summary |
|---|---|
| public String encode(Iterable<? extends Cookie> cookies) Encodes the specified cookies into a single Cookie header value. | |
| encode | back to summary |
|---|---|
| private void encode(StringBuilder buf, Cookie c) | |