Package org.apache.any23.mime

## Class NaiveMIMETypeDetector

- java.lang.Object
- - org.apache.any23.mime.NaiveMIMETypeDetector

- All Implemented Interfaces:
    `MIMETypeDetector`

      public class NaiveMIMETypeDetector
      extends Object
      implements MIMETypeDetector

  Basic implementation of `MIMETypeDetector` based on file extensions.

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `MIMEType` | `guessMIMEType​(String fileName, InputStream input, MIMEType mimeTypeFromMetadata)` | Estimates the `MIME` type of the content of input file.

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

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

- - ### Constructor Detail

    - #### NaiveMIMETypeDetector

          public NaiveMIMETypeDetector()

  - ### Method Detail

    - #### guessMIMEType

          public MIMEType guessMIMEType​(String fileName,
                                        InputStream input,
                                        MIMEType mimeTypeFromMetadata)

      Description copied from interface: `MIMETypeDetector`
      Estimates the `MIME` type of the content of input file.
      Specified by:
        `guessMIMEType` in interface `MIMETypeDetector`
      Parameters:
        `fileName` - name of the file.
        `input` - content of the file.
        `mimeTypeFromMetadata` - mimetype declared in metadata.
      Returns:
        the supposed mime type or `null` if nothing appropriate found.