public class MediaTypeHelper extends Object
Constructor and Description |
---|
MediaTypeHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
compareWeight(MediaType one,
MediaType two) |
static boolean |
equivalent(MediaType m1,
MediaType m2) |
static boolean |
equivalentParams(MediaType m1,
MediaType m2) |
static MediaType |
getBestMatch(List<MediaType> desired,
List<MediaType> provided) |
static MediaType |
getConsumes(Class declaring,
AccessibleObject method) |
static MediaType |
getProduces(Class declaring,
Method method) |
static MediaType |
getProduces(Class declaring,
Method method,
MediaType defaultProduces) |
static float |
getQ(MediaType type) |
static float |
getQWithParamInfo(MediaType type) |
static boolean |
isComposite(String subtype) |
static boolean |
isCompositeWildcardSubtype(String subtype)
subtypes like application/*+xml
|
static boolean |
isTextLike(MediaType mediaType) |
static boolean |
isWildcardCompositeSubtype(String subtype)
subtypes like application/*+xml
|
static List<MediaType> |
parseHeader(String header) |
static boolean |
sameWeight(MediaType one,
MediaType two) |
static void |
sortByWeight(List<MediaType> types) |
public static MediaType getConsumes(Class declaring, AccessibleObject method)
public static MediaType getProduces(Class declaring, Method method, MediaType defaultProduces)
public static float getQ(MediaType type)
public static float getQWithParamInfo(MediaType type)
public static boolean isCompositeWildcardSubtype(String subtype)
subtype
- public static boolean isWildcardCompositeSubtype(String subtype)
subtype
- public static boolean isComposite(String subtype)
public static MediaType getBestMatch(List<MediaType> desired, List<MediaType> provided)
public static boolean isTextLike(MediaType mediaType)
Copyright © 2017 JBoss by Red Hat. All rights reserved.