| java.lang.Object com.noelios.restlet.util.HeaderReader com.noelios.restlet.util.PreferenceReader
PreferenceReader | public class PreferenceReader extends HeaderReader (Code) | | Preference header reader. Works for character sets, encodings, languages or
media types.
author: Jerome Louvel (contact@noelios.com) |
TYPE_CHARACTER_SET | final public static int TYPE_CHARACTER_SET(Code) | | |
TYPE_ENCODING | final public static int TYPE_ENCODING(Code) | | |
TYPE_LANGUAGE | final public static int TYPE_LANGUAGE(Code) | | |
TYPE_MEDIA_TYPE | final public static int TYPE_MEDIA_TYPE(Code) | | |
PreferenceReader | public PreferenceReader(int type, String header)(Code) | | Constructor.
Parameters: type - The type of metadata read. Parameters: header - The header to read. |
createPreference | protected Preference<T> createPreference(CharSequence metadata, Series<Parameter> parameters)(Code) | | Creates a new preference.
Parameters: metadata - The metadata name. Parameters: parameters - The parameters list. The new preference. |
extractMediaParams | protected Series<Parameter> extractMediaParams(Series<Parameter> parameters)(Code) | | Extract the media parameters. Only leave as the quality parameter if
found. Modifies the parameters list.
Parameters: parameters - All the preference parameters. The media parameters. |
extractQuality | protected float extractQuality(Series<Parameter> parameters)(Code) | | Extract the quality value. If the value is not found, 1 is returned.
Parameters: parameters - The preference parameters. The quality value. |
|
|