org.restlet.engine.header
Class EncodingReader

java.lang.Object
  extended by org.restlet.engine.header.HeaderReader<Encoding>
      extended by org.restlet.engine.header.EncodingReader

public class EncodingReader
extends HeaderReader<Encoding>

Encoding header reader.

Author:
Jerome Louvel

Constructor Summary
EncodingReader(String header)
          Constructor.
 
Method Summary
protected  boolean canAdd(Encoding value, 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.header.HeaderReader
addValues, createParameter, createParameter, mark, peek, read, readActualNamedValue, readComment, readDate, readDigits, readHeader, readHeader, readNamedValue, readParameter, 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(String header)
Constructor.

Parameters:
header - The header to read.
Method Detail

canAdd

protected boolean canAdd(Encoding value,
                         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 IOException
Description copied from class: HeaderReader
Read the next value. There can be multiple values for a single header. Returns null by default.

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


Copyright © 2005-2013 Restlet.