|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuws.AcceptHeader
public class AcceptHeader
Parser of HTTP Accept header. It takes into account the order of the different MIME types and their respective quality.
| Constructor Summary | |
|---|---|
AcceptHeader(java.lang.String acceptS)
Parses the given value of the Accept field of HTTP request header. |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.Float> |
getMimeTypes()
Gets the association between each extracted MIME type and its respective quality. |
java.util.ArrayList<java.lang.String> |
getOrderedMimeTypes()
Gets a list of the extracted MIME types, ordered by their respective quality. |
java.lang.String |
getPreferredMimeType()
Gets the preferred MIME type (HTML, JSON or * /*) according to the order and the quality of all extracted MIME types. |
void |
setMimeTypes(java.util.Map<java.lang.String,java.lang.Float> mimeTypes)
Sets the association between MIME types and their quality. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AcceptHeader(java.lang.String acceptS)
acceptS - The list of MIME types to parse.| Method Detail |
|---|
public final java.util.Map<java.lang.String,java.lang.Float> getMimeTypes()
public final void setMimeTypes(java.util.Map<java.lang.String,java.lang.Float> mimeTypes)
mimeTypes - MIME types and their quality.public java.lang.String getPreferredMimeType()
public java.util.ArrayList<java.lang.String> getOrderedMimeTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||