org.jboss.resteasy.util
Class MediaTypeHelper
java.lang.Object
org.jboss.resteasy.util.MediaTypeHelper
public class MediaTypeHelper
- extends java.lang.Object
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaTypeHelper
public MediaTypeHelper()
getConsumes
public static MediaType getConsumes(java.lang.Class declaring,
java.lang.reflect.AccessibleObject method)
getProduces
public static MediaType getProduces(java.lang.Class declaring,
java.lang.reflect.Method method)
getQ
public static float getQ(MediaType type)
getQWithParamInfo
public static float getQWithParamInfo(MediaType type)
isCompositeWildcardSubtype
public static boolean isCompositeWildcardSubtype(java.lang.String subtype)
- subtypes like application/*+xml
- Parameters:
subtype
-
- Returns:
isWildcardCompositeSubtype
public static boolean isWildcardCompositeSubtype(java.lang.String subtype)
- subtypes like application/*+xml
- Parameters:
subtype
-
- Returns:
isComposite
public static boolean isComposite(java.lang.String subtype)
compareWeight
public static int compareWeight(MediaType one,
MediaType two)
sameWeight
public static boolean sameWeight(MediaType one,
MediaType two)
sortByWeight
public static void sortByWeight(java.util.List<MediaType> types)
getBestMatch
public static MediaType getBestMatch(java.util.List<MediaType> desired,
java.util.List<MediaType> provided)
parseHeader
public static java.util.List<MediaType> parseHeader(java.lang.String header)
equivalent
public static boolean equivalent(MediaType m1,
MediaType m2)
equivalentParams
public static boolean equivalentParams(MediaType m1,
MediaType m2)
Copyright © 2010. All Rights Reserved.