Top Description Constructors Methods
io.netty.handler.codec.http

public final Class ClientCookieEncoder

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
io.netty.handler.codec.http.cookie.ClientCookieDecoder

Deprecated

A RFC6265 compliant cookie encoder to be used client side, so only name=value pairs are sent. User-Agents are not supposed to interpret cookies, so, if present, Cookie#rawValue() will be used. Otherwise, Cookie#value() will be used unquoted. Note that multiple cookies are supposed to be sent at once in a single "Cookie" header.
// Example
HttpRequest req = ...;
res.setHeader("Cookie", ClientCookieEncoder.encode("JSESSIONID", "1234"));
See Also
ClientCookieDecoder

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

a Rfc6265 style Cookie header value
encode
(String
the cookie name
name
,
String
the cookie value
value
)

Deprecated
Encodes the specified cookie into a Cookie header value.
public static String

Returns:

a Rfc6265 style Cookie header value
encode
(Cookie
the specified cookie
cookie
)

Deprecated
Encodes the specified cookie into a Cookie header value.
public static String

Returns:

a Rfc6265 style Cookie header value, null if no cookies are passed.
encode
(Cookie...
some cookies
cookies
)

Deprecated
Encodes the specified cookies into a single Cookie header value.
public static String

Returns:

a Rfc6265 style Cookie header value, null if no cookies are passed.
encode
(Iterable<Cookie>
some cookies
cookies
)

Deprecated
Encodes the specified cookies into a single Cookie header value.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ClientCookieEncoderback to summary
private ClientCookieEncoder()

Method Detail

encodeback to summary
public static String encode(String name, String value)

Deprecated

Encodes the specified cookie into a Cookie header value.

Parameters
name:String

the cookie name

value:String

the cookie value

Returns:String

a Rfc6265 style Cookie header value

Annotations
@Deprecated
encodeback to summary
public static String encode(Cookie cookie)

Deprecated

Encodes the specified cookie into a Cookie header value.

Parameters
cookie:Cookie

the specified cookie

Returns:String

a Rfc6265 style Cookie header value

Annotations
@Deprecated
encodeback to summary
public static String encode(Cookie... cookies)

Deprecated

Encodes the specified cookies into a single Cookie header value.

Parameters
cookies:Cookie[]

some cookies

Returns:String

a Rfc6265 style Cookie header value, null if no cookies are passed.

Annotations
@Deprecated
encodeback to summary
public static String encode(Iterable<Cookie> cookies)

Deprecated

Encodes the specified cookies into a single Cookie header value.

Parameters
cookies:Iterable<Cookie>

some cookies

Returns:String

a Rfc6265 style Cookie header value, null if no cookies are passed.

Annotations
@Deprecated