Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`NaiveMIMETypeDetector()`

Method Summary
`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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.