net.sf.okapi.common

## Class MimeTypeMapper

- java.lang.Object
- - net.sf.okapi.common.MimeTypeMapper

-     public final class MimeTypeMapper
      extends java.lang.Object

  Provides definitions for common mime types and mappings from file extensions to mime type.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CSV_MIME_TYPE`
    `static java.lang.String` | `DEFAULT_MIME_TYPE`
    `static java.lang.String` | `DOCM_MIME_TYPE`
    `static java.lang.String` | `DOCX_MIME_TYPE`
    `static java.lang.String` | `DOXYGEN_TXT_MIME_TYPE`
    `static java.lang.String` | `DTD_MIME_TYPE`
    `static java.lang.String` | `FLASH_MIME_TYPE`
    `static java.lang.String` | `HTML_MIME_TYPE`
    `static java.lang.String` | `INDESIGN_MIME_TYPE`
    `static java.lang.String` | `JAVASCRIPT_MIME_TYPE`
    `static java.lang.String` | `JSON_MIME_TYPE`
    `static java.lang.String` | `MIF_MIME_TYPE`
    `static java.lang.String` | `MS_DOC_MIME_TYPE`
    `static java.lang.String` | `MS_EXCEL_MIME_TYPE`
    `static java.lang.String` | `MS_POWERPOINT_MIME_TYPE`
    `static java.lang.String` | `ODF_MIME_TYPE`
    `static java.lang.String` | `OPENOFFICE_MIME_TYPE`
    `static java.lang.String` | `PHP_MIME_TYPE`
    `static java.lang.String` | `PLAIN_TEXT_MIME_TYPE`
    `static java.lang.String` | `PO_MIME_TYPE`
    `static java.lang.String` | `PPTM_MIME_TYPE`
    `static java.lang.String` | `PPTX_MIME_TYPE`
    `static java.lang.String` | `PROPERTIES_MIME_TYPE`
    `static java.lang.String` | `QUARK_MIME_TYPE`
    `static java.lang.String` | `RTF_MIME_TYPE`
    `static java.lang.String` | `SERVER_SIDE_INCLUDE_MIME_TYPE`
    `static java.lang.String` | `TMX_MIME_TYPE`
    `static java.lang.String` | `TRANSIFEX`
    `static java.lang.String` | `TS_MIME_TYPE`
    `static java.lang.String` | `TTX_MIME_TYPE`
    `static java.lang.String` | `VERSIFIED_TXT_MIME_TYPE`
    `static java.lang.String` | `XHTML_MIME_TYPE`
    `static java.lang.String` | `XINI_MIME_TYPE`
    `static java.lang.String` | `XLIFF_MIME_TYPE`
    `static java.lang.String` | `XLSM_MIME_TYPE`
    `static java.lang.String` | `XLSX_MIME_TYPE`
    `static java.lang.String` | `XML_MIME_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MimeTypeMapper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getMimeType(java.lang.String extension)` Gets the mime type associated with the provided file extension.

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

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

- - ### Field Detail

    - #### DEFAULT_MIME_TYPE

          public static final java.lang.String DEFAULT_MIME_TYPE

      See Also:
        Constant Field Values

    - #### XML_MIME_TYPE

          public static final java.lang.String XML_MIME_TYPE

      See Also:
        Constant Field Values

    - #### ODF_MIME_TYPE

          public static final java.lang.String ODF_MIME_TYPE

      See Also:
        Constant Field Values

    - #### HTML_MIME_TYPE

          public static final java.lang.String HTML_MIME_TYPE

      See Also:
        Constant Field Values

    - #### XHTML_MIME_TYPE

          public static final java.lang.String XHTML_MIME_TYPE

      See Also:
        Constant Field Values

    - #### PO_MIME_TYPE

          public static final java.lang.String PO_MIME_TYPE

      See Also:
        Constant Field Values

    - #### XLIFF_MIME_TYPE

          public static final java.lang.String XLIFF_MIME_TYPE

      See Also:
        Constant Field Values

    - #### RTF_MIME_TYPE

          public static final java.lang.String RTF_MIME_TYPE

      See Also:
        Constant Field Values

    - #### MS_DOC_MIME_TYPE

          public static final java.lang.String MS_DOC_MIME_TYPE

      See Also:
        Constant Field Values

    - #### MS_EXCEL_MIME_TYPE

          public static final java.lang.String MS_EXCEL_MIME_TYPE

      See Also:
        Constant Field Values

    - #### MS_POWERPOINT_MIME_TYPE

          public static final java.lang.String MS_POWERPOINT_MIME_TYPE

      See Also:
        Constant Field Values

    - #### JAVASCRIPT_MIME_TYPE

          public static final java.lang.String JAVASCRIPT_MIME_TYPE

      See Also:
        Constant Field Values

    - #### CSV_MIME_TYPE

          public static final java.lang.String CSV_MIME_TYPE

      See Also:
        Constant Field Values

    - #### INDESIGN_MIME_TYPE

          public static final java.lang.String INDESIGN_MIME_TYPE

      See Also:
        Constant Field Values

    - #### MIF_MIME_TYPE

          public static final java.lang.String MIF_MIME_TYPE

      See Also:
        Constant Field Values

    - #### PLAIN_TEXT_MIME_TYPE

          public static final java.lang.String PLAIN_TEXT_MIME_TYPE

      See Also:
        Constant Field Values

    - #### QUARK_MIME_TYPE

          public static final java.lang.String QUARK_MIME_TYPE

      See Also:
        Constant Field Values

    - #### FLASH_MIME_TYPE

          public static final java.lang.String FLASH_MIME_TYPE

      See Also:
        Constant Field Values

    - #### PROPERTIES_MIME_TYPE

          public static final java.lang.String PROPERTIES_MIME_TYPE

      See Also:
        Constant Field Values

    - #### DTD_MIME_TYPE

          public static final java.lang.String DTD_MIME_TYPE

      See Also:
        Constant Field Values

    - #### SERVER_SIDE_INCLUDE_MIME_TYPE

          public static final java.lang.String SERVER_SIDE_INCLUDE_MIME_TYPE

      See Also:
        Constant Field Values

    - #### DOCX_MIME_TYPE

          public static final java.lang.String DOCX_MIME_TYPE

      See Also:
        Constant Field Values

    - #### XLSX_MIME_TYPE

          public static final java.lang.String XLSX_MIME_TYPE

      See Also:
        Constant Field Values

    - #### PPTX_MIME_TYPE

          public static final java.lang.String PPTX_MIME_TYPE

      See Also:
        Constant Field Values

    - #### DOCM_MIME_TYPE

          public static final java.lang.String DOCM_MIME_TYPE

      See Also:
        Constant Field Values

    - #### XLSM_MIME_TYPE

          public static final java.lang.String XLSM_MIME_TYPE

      See Also:
        Constant Field Values

    - #### PPTM_MIME_TYPE

          public static final java.lang.String PPTM_MIME_TYPE

      See Also:
        Constant Field Values

    - #### TS_MIME_TYPE

          public static final java.lang.String TS_MIME_TYPE

      See Also:
        Constant Field Values

    - #### PHP_MIME_TYPE

          public static final java.lang.String PHP_MIME_TYPE

      See Also:
        Constant Field Values

    - #### OPENOFFICE_MIME_TYPE

          public static final java.lang.String OPENOFFICE_MIME_TYPE

      See Also:
        Constant Field Values

    - #### TTX_MIME_TYPE

          public static final java.lang.String TTX_MIME_TYPE

      See Also:
        Constant Field Values

    - #### TMX_MIME_TYPE

          public static final java.lang.String TMX_MIME_TYPE

      See Also:
        Constant Field Values

    - #### VERSIFIED_TXT_MIME_TYPE

          public static final java.lang.String VERSIFIED_TXT_MIME_TYPE

      See Also:
        Constant Field Values

    - #### XINI_MIME_TYPE

          public static final java.lang.String XINI_MIME_TYPE

      See Also:
        Constant Field Values

    - #### DOXYGEN_TXT_MIME_TYPE

          public static final java.lang.String DOXYGEN_TXT_MIME_TYPE

      See Also:
        Constant Field Values

    - #### TRANSIFEX

          public static final java.lang.String TRANSIFEX

      See Also:
        Constant Field Values

    - #### JSON_MIME_TYPE

          public static final java.lang.String JSON_MIME_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MimeTypeMapper

          public MimeTypeMapper()

  - ### Method Detail

    - #### getMimeType

          public static java.lang.String getMimeType(java.lang.String extension)

      Gets the mime type associated with the provided file extension. Some mime types map to many file extensions. Some file extensions map to many mime types. For example, there are many types of xml files which have different mime types.
      Parameters:
        `extension` - the file extension to lookup (without the dot prefix)
      Returns:
        the mime type (UNKOWN_MIME_TYPE if the extension is not known).