Package: grails.web.mime

## [Groovy] Class MimeType

- grails.web.mime.MimeType

-     @groovy.transform.CompileStatic
      class MimeType
      extends java.lang.Object

  Authors:
    Graeme Rocher
  Since:
    1.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static MimeType` | `ALL` |
    `static MimeType` | `ATOM_XML` |
    `static java.lang.String` | `BEAN_NAME` | The bean name used to store the mime type definitions
    `private static java.lang.Object` | `DEFAULTS` |
    `static MimeType` | `FORM` |
    `static MimeType` | `HAL_JSON` |
    `static MimeType` | `HAL_XML` |
    `static MimeType` | `HTML` |
    `static MimeType` | `JSON` |
    `static MimeType` | `JSON_API` |
    `static MimeType` | `MULTIPART_FORM` |
    `static java.lang.String` | `QUALITY_RATING` |
    `static BigDecimal` | `QUALITY_RATING_NUMBER` |
    `static MimeType` | `TEXT_JSON` |
    `static MimeType` | `TEXT_XML` |
    `static MimeType` | `XHTML` |
    `static MimeType` | `XML` |
    `private java.lang.String` | `extension` |
    `private java.lang.String` | `name` |
    `private java.util.Map<java.lang.String, java.lang.String>` | `parameters` |
    `private BigDecimal` | `qualityNumberField` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.String` | `extension`
    `java.lang.String` | `name`
    `java.util.Map<java.lang.String, java.lang.String>` | `parameters`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MimeType (java.lang.String name, java.util.Map params)`
    `MimeType (java.lang.String name, java.lang.String extension, java.util.Map<java.lang.String, java.lang.String> params)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static MimeType[]` | `createDefaults()` Creates the default MimeType configuration if none exists in Config.groovy
    `` | `boolean` | `equals(java.lang.Object o)`
    `` | `static MimeType[]` | `getConfiguredMimeTypes()` Returns: An array of MimeTypes
    `` | `private BigDecimal` | `getOrConvertQualityParameterToBigDecimal(MimeType mt)`
    `` | `java.lang.String` | `getQuality()` Returns: The quality of the Mime type
    `` | `BigDecimal` | `getQualityAsNumber()` Returns: The quality in BigDecimal form
    `` | `java.lang.String` | `getVersion()` Returns: The version of the Mime type
    `` | `int` | `hashCode()`
    `` | `java.lang.String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### public static final MimeType ALL

    - #### public static final MimeType ATOM_XML

    - #### public static final java.lang.String BEAN_NAME

      The bean name used to store the mime type definitions

    - #### private static java.lang.Object DEFAULTS

    - #### public static final MimeType FORM

    - #### public static final MimeType HAL_JSON

    - #### public static final MimeType HAL_XML

    - #### public static final MimeType HTML

    - #### public static final MimeType JSON

    - #### public static final MimeType JSON_API

    - #### public static final MimeType MULTIPART_FORM

    - #### public static final java.lang.String QUALITY_RATING

    - #### public static final BigDecimal QUALITY_RATING_NUMBER

    - #### public static final MimeType TEXT_JSON

    - #### public static final MimeType TEXT_XML

    - #### public static final MimeType XHTML

    - #### public static final MimeType XML

    - #### private java.lang.String extension

    - #### private java.lang.String name

    - #### private java.util.Map<java.lang.String, java.lang.String> parameters

    - #### private BigDecimal qualityNumberField

  - ### Property Detail

    - #### java.lang.String extension

    - #### java.lang.String name

    - #### java.util.Map<java.lang.String, java.lang.String> parameters

  - ### Constructor Detail

    - #### MimeType(java.lang.String name, java.util.Map params)

    - #### MimeType(java.lang.String name, java.lang.String extension, java.util.Map<java.lang.String, java.lang.String> params)

  - ### Method Detail

    - #### static MimeType[] createDefaults()

      Creates the default MimeType configuration if none exists in Config.groovy

    - #### boolean equals(java.lang.Object o)

    - #### static MimeType[] getConfiguredMimeTypes()

      Returns:
        An array of MimeTypes

    - #### private BigDecimal getOrConvertQualityParameterToBigDecimal(MimeType mt)

    - #### java.lang.String getQuality()

      Returns:
        The quality of the Mime type

    - #### BigDecimal getQualityAsNumber()

      Returns:
        The quality in BigDecimal form

    - #### java.lang.String getVersion()

      Returns:
        The version of the Mime type

    - #### int hashCode()

    - #### java.lang.String toString()