|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.core.MediaType
org.glassfish.jersey.message.internal.QualitySourceMediaType
public class QualitySourceMediaType
A quality source media type.
| Field Summary | |
|---|---|
static String |
QUALITY_SOURCE_PARAMETER_NAME
Quality source header value parameter name. |
| Constructor Summary | |
|---|---|
QualitySourceMediaType(String type,
String subtype)
Create new quality source media type instance with a default quality factor value. |
|
QualitySourceMediaType(String type,
String subtype,
int quality,
Map<String,String> parameters)
Create new quality source media type instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
getQualitySource()
Get quality source factor value (in [ppt]). |
static int |
getQualitySource(MediaType mediaType)
Extract quality source information from the supplied MediaType value. |
int |
hashCode()
|
static QualitySourceMediaType |
valueOf(HttpHeaderReader reader)
Create new quality source media type instance from the supplied HTTP header reader. |
| Methods inherited from class javax.ws.rs.core.MediaType |
|---|
getParameters, getSubtype, getType, isCompatible, isWildcardSubtype, isWildcardType, toString, valueOf, withCharset |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String QUALITY_SOURCE_PARAMETER_NAME
| Constructor Detail |
|---|
public QualitySourceMediaType(String type,
String subtype)
default quality factor value.
type - the primary type, null is equivalent to
MediaType.MEDIA_TYPE_WILDCARDsubtype - the subtype, null is equivalent to
MediaType.MEDIA_TYPE_WILDCARD
public QualitySourceMediaType(String type,
String subtype,
int quality,
Map<String,String> parameters)
type - the primary type, null is equivalent to
MediaType.MEDIA_TYPE_WILDCARDsubtype - the subtype, null is equivalent to
MediaType.MEDIA_TYPE_WILDCARDquality - quality source factor value in [ppt]. See Qualified.parameters - a map of media type parameters, null is the same as an
empty map.| Method Detail |
|---|
public int getQualitySource()
public static QualitySourceMediaType valueOf(HttpHeaderReader reader)
throws ParseException
HTTP header reader.
reader - HTTP header reader.
ParseException - in case the input data parsing failed.
public static int getQualitySource(MediaType mediaType)
throws IllegalArgumentException
MediaType value.
If no quality source parameter is present in the media type, default quality is returned.
mediaType - media type.
default quality,
if no quality source parameter is present.
IllegalArgumentException - in case the quality source parameter value could not be parsed.public boolean equals(Object obj)
equals in class MediaTypepublic int hashCode()
hashCode in class MediaType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||