org.cruxframework.crux.core.server.rest.util
Class MediaTypeHelper
java.lang.Object
org.cruxframework.crux.core.server.rest.util.MediaTypeHelper
public class MediaTypeHelper
- extends 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()
getQ
public static float getQ(MediaType type)
getQWithParamInfo
public static float getQWithParamInfo(MediaType type)
isCompositeWildcardSubtype
public static boolean isCompositeWildcardSubtype(String subtype)
- subtypes like application/*+xml
- Parameters:
subtype -
- Returns:
isWildcardCompositeSubtype
public static boolean isWildcardCompositeSubtype(String subtype)
- subtypes like application/*+xml
- Parameters:
subtype -
- Returns:
isComposite
public static boolean isComposite(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(List<MediaType> types)
getBestMatch
public static MediaType getBestMatch(List<MediaType> desired,
List<MediaType> provided)
parseHeader
public static List<MediaType> parseHeader(String header)
equivalent
public static boolean equivalent(MediaType m1,
MediaType m2)
equivalentParams
public static boolean equivalentParams(MediaType m1,
MediaType m2)
Copyright © 2015. All rights reserved.