public class CookieWriter extends HeaderWriter<Cookie>
Constructor and Description |
---|
CookieWriter() |
Modifier and Type | Method and Description |
---|---|
CookieWriter |
append(Cookie cookie)
Appends a value.
|
CookieWriter |
append(java.util.List<Cookie> cookies)
Appends a list of cookies as an HTTP header.
|
CookieWriter |
appendValue(java.lang.String value,
int version)
Appends a source string as an HTTP comment.
|
static void |
getCookies(java.util.List<Cookie> source,
java.util.Map<java.lang.String,Cookie> destination)
Gets the cookies whose name is a key in the given map.
|
static java.lang.String |
write(Cookie cookie)
Writes a cookie.
|
static java.lang.String |
write(java.util.List<Cookie> cookies)
Writes a cookie.
|
append, append, append, append, append, append, appendComment, appendExtension, appendExtension, appendParameterSeparator, appendProduct, appendQuotedPair, appendQuotedString, appendSpace, appendToken, appendUriEncoded, appendValueSeparator, canWrite
public static void getCookies(java.util.List<Cookie> source, java.util.Map<java.lang.String,Cookie> destination)
source
- The source list of cookies.destination
- The cookies map controlling the reading.public static java.lang.String write(Cookie cookie) throws java.lang.IllegalArgumentException
cookie
- The cookie to format.java.lang.IllegalArgumentException
- If the Cookie contains illegal values.public static java.lang.String write(java.util.List<Cookie> cookies)
cookies
- The cookies to format.public CookieWriter append(Cookie cookie) throws java.lang.IllegalArgumentException
HeaderWriter
append
in class HeaderWriter<Cookie>
cookie
- The value.java.lang.IllegalArgumentException
public CookieWriter append(java.util.List<Cookie> cookies)
cookies
- The list of cookies to format.public CookieWriter appendValue(java.lang.String value, int version)
value
- The source string to format.version
- The cookie version.Copyright © 2005-2020 Restlet.