org.restlet.engine.http.header

## Class EncodingWriter

- java.lang.Object
- - java.io.Writer
  - - java.io.StringWriter
    - - org.restlet.engine.http.header.HeaderWriter<M>
      - - org.restlet.engine.http.header.MetadataWriter<Encoding>
        - - org.restlet.engine.http.header.EncodingWriter

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

    public class EncodingWriter
    extends MetadataWriter<Encoding>

Encoding header writer.

Author:
  Jerome Louvel

### Field Summary

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

`lock`

### Constructor Summary

Constructors
Constructor and Description
`EncodingWriter()`

### Method Summary

Methods
`protected boolean` `canWrite(Encoding encoding)` Indicates if the value can be written to the header.
`static java.lang.String` `write(java.util.List<Encoding> encodings)` Writes a list of encodings.

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

`append`

### 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`

### 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

#### EncodingWriter

    public EncodingWriter()

### Method Detail

#### write

    public static java.lang.String write(java.util.List<Encoding> encodings)

Writes a list of encodings.

Parameters:
  `encodings` - The encodings to write.
Returns:
  This writer.

#### canWrite

    protected boolean canWrite(Encoding encoding)

Description copied from class: `HeaderWriter`
Indicates if the value can be written to the header. Useful to prevent the writing of `Encoding.IDENTITY` constants for example. By default it returns true for non null values.

Overrides:
  `canWrite` in class `HeaderWriter<Encoding>`
Parameters:
  `encoding` - The value to add.
Returns:
  True if the value can be added.