org.restlet.engine.http.header

## Class ExpectationReader

- java.lang.Object
- - org.restlet.engine.http.header.HeaderReader<Expectation>
  - - org.restlet.engine.http.header.ExpectationReader

    public class ExpectationReader
    extends HeaderReader<Expectation>

Expectation header reader.

Author:
  Jerome Louvel

### Constructor Summary

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

### Method Summary

Methods
`static void` `addValues(java.lang.String header, ClientInfo clientInfo)` Adds values to the given collection.
`protected Parameter` `createParameter(java.lang.String name, java.lang.String value)` Creates a new parameter.
`Expectation` `readValue()` Read the next value.

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

`addValues, canAdd, 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

#### ExpectationReader

    public ExpectationReader(java.lang.String header)

Constructor.

Parameters:
  `header` - The header to read.

### Method Detail

#### addValues

    public static void addValues(java.lang.String header,
                 ClientInfo clientInfo)

Adds values to the given collection.

Parameters:
  `header` - The header to read.
  `clientInfo` - The client info to update.

#### createParameter

    protected Parameter createParameter(java.lang.String name,
                            java.lang.String value)

Description copied from class: `HeaderReader`
Creates a new parameter. Can be overridden.

Overrides:
  `createParameter` in class `HeaderReader<Expectation>`
Parameters:
  `name` - The parameter name.
  `value` - The parameter value or null.
Returns:
  The new parameter.

#### readValue

    public Expectation 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<Expectation>`
Returns:
  The next value.
Throws:
  `java.io.IOException`