public final class ServerCookieEncoder extends Object
Cookies into HTTP header values. This encoder can encode
the HTTP cookie version 0, 1, and 2.
// ExampleHttpRequestreq = ...; res.setHeader("Set-Cookie",ServerCookieEncoder.encode("JSESSIONID", "1234"));
CookieDecoder| Modifier and Type | Method and Description |
|---|---|
static List<String> |
encode(Collection<Cookie> cookies) |
static List<String> |
encode(Cookie... cookies) |
static String |
encode(Cookie cookie) |
static List<String> |
encode(Iterable<Cookie> cookies) |
static String |
encode(String name,
String value)
Encodes the specified cookie into an HTTP header value.
|
Copyright © 2008–2013 The Netty Project. All rights reserved.