|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.noelios.restlet.http.HeaderReader
com.noelios.restlet.http.PreferenceReader<T>
public class PreferenceReader<T extends Metadata>
Preference header reader. Works for character sets, encodings, languages or media types.
| Field Summary | |
|---|---|
static int |
TYPE_CHARACTER_SET
|
static int |
TYPE_ENCODING
|
static int |
TYPE_LANGUAGE
|
static int |
TYPE_MEDIA_TYPE
|
| Constructor Summary | |
|---|---|
PreferenceReader(int type,
String header)
Constructor. |
|
| Method Summary | |
|---|---|
protected Preference<T> |
createPreference(CharSequence metadata,
Series<Parameter> parameters)
Creates a new preference. |
protected Series<Parameter> |
extractMediaParams(Series<Parameter> parameters)
Extract the media parameters. |
protected float |
extractQuality(Series<Parameter> parameters)
Extract the quality value. |
Preference<T> |
readPreference()
Read the next preference. |
| Methods inherited from class com.noelios.restlet.http.HeaderReader |
|---|
appendQuotedString, isLinearWhiteSpace, isValueSeparator, read, readQuotedString, readValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_CHARACTER_SET
public static final int TYPE_ENCODING
public static final int TYPE_LANGUAGE
public static final int TYPE_MEDIA_TYPE
| Constructor Detail |
|---|
public PreferenceReader(int type,
String header)
type - The type of metadata read.header - The header to read.| Method Detail |
|---|
protected Preference<T> createPreference(CharSequence metadata,
Series<Parameter> parameters)
metadata - The metadata name.parameters - The parameters list.
protected Series<Parameter> extractMediaParams(Series<Parameter> parameters)
parameters - All the preference parameters.
protected float extractQuality(Series<Parameter> parameters)
parameters - The preference parameters.
public Preference<T> readPreference()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||