org.jboss.resteasy.util

## Class MediaTypeHelper

- java.lang.Object
- - org.jboss.resteasy.util.MediaTypeHelper

-     public class MediaTypeHelper
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MediaTypeHelper()`

  - ### Method Summary

    Methods
    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` | `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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MediaTypeHelper

          public MediaTypeHelper()

  - ### Method Detail

    - #### getConsumes

          public static MediaType getConsumes(Class declaring,
                              AccessibleObject method)

    - #### getProduces

          public static MediaType getProduces(Class declaring,
                              Method method)

    - #### getProduces

          public static MediaType getProduces(Class declaring,
                              Method method,
                              MediaType defaultProduces)

    - #### 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 © 2014. All Rights Reserved.