org.restlet.engine.http.header

## Class CookieSettingWriter

- java.lang.Object
- - java.io.Writer
  - - java.io.StringWriter
    - - org.restlet.engine.http.header.HeaderWriter<CookieSetting>
      - - org.restlet.engine.http.header.CookieSettingWriter

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public class CookieSettingWriter
    extends HeaderWriter<CookieSetting>

Cookie setting header writer.

Author:
  Jerome Louvel

### Field Summary

### Fields inherited from class java.io.Writer

`lock`

### Constructor Summary

Constructors
Constructor and Description
`CookieSettingWriter()`

### Method Summary

Methods
`CookieSettingWriter` `append(CookieSetting cookieSetting)` Appends a value.
`CookieSettingWriter` `appendValue(java.lang.String value, int version)` Appends a source string as an HTTP comment.
`static java.lang.String` `write(CookieSetting cookieSetting)` Writes a cookie setting.
`static java.lang.String` `write(java.util.List<CookieSetting> cookieSettings)` Writes a list of cookie settings.

### Methods inherited from class org.restlet.engine.http.header.HeaderWriter

`append, append, append, append, append, append, appendComment, appendExtension, appendExtension, appendParameterSeparator, appendProduct, appendQuotedPair, appendQuotedString, appendSpace, appendToken, appendUriEncoded, appendValueSeparator, canWrite`

### Methods inherited from class java.io.StringWriter

`append, close, flush, getBuffer, toString, write, write, write, write`

### Methods inherited from class java.io.Writer

`write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CookieSettingWriter

    public CookieSettingWriter()

### Method Detail

#### write

    public static java.lang.String write(CookieSetting cookieSetting)

Writes a cookie setting.

Parameters:
  `cookieSetting` - The cookie setting to format.
Returns:
  The formatted cookie setting.

#### write

    public static java.lang.String write(java.util.List<CookieSetting> cookieSettings)

Writes a list of cookie settings.

Parameters:
  `cookieSettings` - The cookie settings to write.
Returns:
  The formatted cookie setting.

#### append

    public CookieSettingWriter append(CookieSetting cookieSetting)
                               throws java.lang.IllegalArgumentException

Description copied from class: `HeaderWriter`
Appends a value.

Specified by:
  `append` in class `HeaderWriter<CookieSetting>`
Parameters:
  `cookieSetting` - The value.
Returns:
  This writer.
Throws:
  `java.lang.IllegalArgumentException`

#### appendValue

    public CookieSettingWriter appendValue(java.lang.String value,
                                  int version)

Appends a source string as an HTTP comment.

Parameters:
  `value` - The source string to format.
  `version` - The cookie version.
Returns:
  This writer.