Package org.apache.any23.cli

## Class MimeDetector

- java.lang.Object
- - org.apache.any23.cli.MimeDetector

- All Implemented Interfaces:
    `Tool`

      public class MimeDetector
      extends Object

  Commandline tool to detect MIME Types from file, HTTP and direct input sources. The implementation of this tool is based on `TikaMIMETypeDetector`.
  Author:
    Michele Mostarda (mostarda@fbk.eu)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `MimeDetector.MimeDetectorDocumentSourceConverter` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `FILE_DOCUMENT_PREFIX` |
    `static String` | `INLINE_DOCUMENT_PREFIX` |
    `static String` | `URL_DOCUMENT_RE` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MimeDetector()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `run()` | Runs the tool and retrieves the exit code.

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

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

- - ### Field Detail

    - #### FILE_DOCUMENT_PREFIX

          public static final String FILE_DOCUMENT_PREFIX

      See Also:
        Constant Field Values

    - #### INLINE_DOCUMENT_PREFIX

          public static final String INLINE_DOCUMENT_PREFIX

      See Also:
        Constant Field Values

    - #### URL_DOCUMENT_RE

          public static final String URL_DOCUMENT_RE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MimeDetector

          public MimeDetector()

  - ### Method Detail

    - #### run

          public void run()
                   throws Exception

      Description copied from interface: `Tool`
      Runs the tool and retrieves the exit code.
      Throws:
        `Exception` - if there is an error running the tool.