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(List<Cookie> cookies)
Appends a list of cookies as an HTTP header.
|
CookieWriter |
appendValue(String value,
int version)
Appends a source string as an HTTP comment.
|
static void |
getCookies(List<Cookie> source,
Map<String,Cookie> destination)
Gets the cookies whose name is a key in the given map.
|
static String |
write(Cookie cookie)
Writes a cookie.
|
static String |
write(List<Cookie> cookies)
Writes a cookie.
|
append, append, append, append, append, append, appendComment, appendExtension, appendExtension, appendParameterSeparator, appendProduct, appendQuotedPair, appendQuotedString, appendSpace, appendToken, appendUriEncoded, appendValueSeparator, canWritepublic static void getCookies(List<Cookie> source, Map<String,Cookie> destination)
source - The source list of cookies.destination - The cookies map controlling the reading.public static String write(Cookie cookie) throws IllegalArgumentException
cookie - The cookie to format.IllegalArgumentException - If the Cookie contains illegal values.public static String write(List<Cookie> cookies)
cookies - The cookies to format.public CookieWriter append(Cookie cookie) throws IllegalArgumentException
HeaderWriterappend in class HeaderWriter<Cookie>cookie - The value.IllegalArgumentExceptionpublic CookieWriter append(List<Cookie> cookies)
cookies - The list of cookies to format.public CookieWriter appendValue(String value, int version)
value - The source string to format.version - The cookie version.Copyright © 2005–2025. All rights reserved.