JBoss.org Community Documentation

- Prev
- Next

## Chapter 34. Aperture MIME type detector

The `ApertureMimeTypeDetector` class is an implementation of MimeTypeDetector that uses the Aperture open-source library, which is a very capable utility for determining the MIME type for a wide range of file types, using both the file name and the actual content.

To use, simply include the `modeshape-mime-type-detector-aperture.jar` file on the classpath and create a new `ExecutionContext` subcontext with it:

    MimeTypeDetector myDetector = new ApertureMimeTypeDetector();
    ExecutionContext contextWithMyDetector = context.with(myDetector);

- PrevPart V. MIME Type Detector Library
- Top of page
- Front page
- NextChapter 35. Writing custom detectors