public final class ClientCookieEncoder
extends java.lang.Object
ClientCookieDecoder
Modifier and Type | Field and Description |
---|---|
static ClientCookieEncoder |
LAX
Lax instance that doesn't validate name and value
|
static ClientCookieEncoder |
STRICT
Strict encoder that validates that name and value chars are in the valid scope
defined in RFC6265
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
encode(Cookie... cookies)
Encodes the specified cookies into a single Cookie header value.
|
java.lang.String |
encode(Cookie cookie)
Encodes the specified cookie into a Cookie header value.
|
java.lang.String |
encode(java.lang.Iterable<? extends Cookie> cookies)
Encodes the specified cookies into a single Cookie header value.
|
java.lang.String |
encode(java.lang.String name,
java.lang.String value)
Encodes the specified cookie into a Cookie header value.
|
protected void |
validateCookie(java.lang.String name,
java.lang.String value) |
public static final ClientCookieEncoder STRICT
public static final ClientCookieEncoder LAX
public java.lang.String encode(java.lang.String name, java.lang.String value)
name
- the cookie namevalue
- the cookie valuepublic java.lang.String encode(Cookie cookie)
cookie
- specified the cookiepublic java.lang.String encode(Cookie... cookies)
cookies
- some cookiespublic java.lang.String encode(java.lang.Iterable<? extends Cookie> cookies)
cookies
- some cookiesprotected void validateCookie(java.lang.String name, java.lang.String value)