org.restlet.engine.http.header

## Class EncodingReader

- java.lang.Object
- - org.restlet.engine.http.header.HeaderReader<Encoding>
  - - org.restlet.engine.http.header.EncodingReader

    public class EncodingReader
    extends HeaderReader<Encoding>

Encoding header reader.

Author:
  Jerome Louvel

### Constructor Summary

Constructors
Constructor and Description
`EncodingReader(java.lang.String header)` Constructor.

### Method Summary

Methods
`protected boolean` `canAdd(Encoding value, java.util.Collection<Encoding> values)` Indicates if the value can be added the the list.
`Encoding` `readValue()` Read the next value.

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

`addValues, createParameter, createParameter, mark, peek, read, readComment, readDate, readDigits, readHeader, readHeader, readParameter, readParameterValue, readQuotedString, readRawText, readRawValue, readToken, readValues, reset, skipParameterSeparator, skipSpaces, skipValueSeparator, unread`

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

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

### Constructor Detail

#### EncodingReader

    public EncodingReader(java.lang.String header)

Constructor.

Parameters:
  `header` - The header to read.

### Method Detail

#### canAdd

    protected boolean canAdd(Encoding value,
                 java.util.Collection<Encoding> values)

Description copied from class: `HeaderReader`
Indicates if the value can be added the the list. Useful to prevent the addition of `Encoding.IDENTITY` constants for example. By default it returns true for non null values.

Overrides:
  `canAdd` in class `HeaderReader<Encoding>`
Parameters:
  `value` - The value to add.
  `values` - The target collection.
Returns:
  True if the value can be added.

#### readValue

    public Encoding readValue()
                       throws java.io.IOException

Description copied from class: `HeaderReader`
Read the next value. There can be multiple values for a single header.

Overrides:
  `readValue` in class `HeaderReader<Encoding>`
Returns:
  The next value.
Throws:
  `java.io.IOException`