Package 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 | Description
    --- | ---
    `MediaTypeHelper()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static int` | `compareWeight​(javax.ws.rs.core.MediaType one, javax.ws.rs.core.MediaType two)` |
    `static boolean` | `equivalent​(javax.ws.rs.core.MediaType m1, javax.ws.rs.core.MediaType m2)` |
    `static boolean` | `equivalentParams​(javax.ws.rs.core.MediaType m1, javax.ws.rs.core.MediaType m2)` |
    `static javax.ws.rs.core.MediaType` | `getBestMatch​(List<javax.ws.rs.core.MediaType> desired, List<javax.ws.rs.core.MediaType> provided)` |
    `static javax.ws.rs.core.MediaType` | `getConsumes​(Class declaring, AccessibleObject method)` |
    `static javax.ws.rs.core.MediaType[]` | `getProduces​(Class declaring, Method method)` |
    `static javax.ws.rs.core.MediaType[]` | `getProduces​(Class declaring, Method method, javax.ws.rs.core.MediaType defaultProduces)` |
    `static float` | `getQ​(javax.ws.rs.core.MediaType type)` |
    `static float` | `getQWithParamInfo​(javax.ws.rs.core.MediaType type)` |
    `static boolean` | `isBlacklisted​(javax.ws.rs.core.MediaType mediaType)` |
    `static boolean` | `isComposite​(String subtype)` |
    `static boolean` | `isCompositeWildcardSubtype​(String subtype)` | subtypes like application/*+xml
    `static boolean` | `isTextLike​(javax.ws.rs.core.MediaType mediaType)` |
    `static boolean` | `isWildcardCompositeSubtype​(String subtype)` | subtypes like application/*+xml
    `static List<javax.ws.rs.core.MediaType>` | `parseHeader​(String header)` |
    `static boolean` | `sameWeight​(javax.ws.rs.core.MediaType one, javax.ws.rs.core.MediaType two)` |
    `static void` | `sortByWeight​(List<javax.ws.rs.core.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 javax.ws.rs.core.MediaType getConsumes​(Class declaring,
                                                               AccessibleObject method)

    - #### getProduces

          public static javax.ws.rs.core.MediaType[] getProduces​(Class declaring,
                                                                 Method method)

    - #### getProduces

          public static javax.ws.rs.core.MediaType[] getProduces​(Class declaring,
                                                                 Method method,
                                                                 javax.ws.rs.core.MediaType defaultProduces)

    - #### getQ

          public static float getQ​(javax.ws.rs.core.MediaType type)

    - #### getQWithParamInfo

          public static float getQWithParamInfo​(javax.ws.rs.core.MediaType type)

    - #### isCompositeWildcardSubtype

          public static boolean isCompositeWildcardSubtype​(String subtype)

      subtypes like application/*+xml
      Parameters:
        `subtype` - subtype
      Returns:
        true if subtype is composite

    - #### isWildcardCompositeSubtype

          public static boolean isWildcardCompositeSubtype​(String subtype)

      subtypes like application/*+xml
      Parameters:
        `subtype` - subtype
      Returns:
        true if subtype is wildcard composite

    - #### isComposite

          public static boolean isComposite​(String subtype)

    - #### compareWeight

          public static int compareWeight​(javax.ws.rs.core.MediaType one,
                                          javax.ws.rs.core.MediaType two)

    - #### sameWeight

          public static boolean sameWeight​(javax.ws.rs.core.MediaType one,
                                           javax.ws.rs.core.MediaType two)

    - #### sortByWeight

          public static void sortByWeight​(List<javax.ws.rs.core.MediaType> types)

    - #### getBestMatch

          public static javax.ws.rs.core.MediaType getBestMatch​(List<javax.ws.rs.core.MediaType> desired,
                                                                List<javax.ws.rs.core.MediaType> provided)

    - #### parseHeader

          public static List<javax.ws.rs.core.MediaType> parseHeader​(String header)

    - #### equivalent

          public static boolean equivalent​(javax.ws.rs.core.MediaType m1,
                                           javax.ws.rs.core.MediaType m2)

    - #### equivalentParams

          public static boolean equivalentParams​(javax.ws.rs.core.MediaType m1,
                                                 javax.ws.rs.core.MediaType m2)

    - #### isTextLike

          public static boolean isTextLike​(javax.ws.rs.core.MediaType mediaType)

    - #### isBlacklisted

          public static boolean isBlacklisted​(javax.ws.rs.core.MediaType mediaType)