Class EncodingReader

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

public class EncodingReader extends HeaderReader<Encoding>
Encoding header reader.
Author:
Jerome Louvel
  • Constructor Details

    • EncodingReader

      public EncodingReader(String header)
      Constructor.
      Parameters:
      header - The header to read.
  • Method Details

    • 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