<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ ModeShape (http://www.modeshape.org)
  ~
  ~ See the COPYRIGHT.txt file distributed with this work for information
  ~ regarding copyright ownership.  Some portions may be licensed
  ~ to Red Hat, Inc. under one or more contributor license agreements.
  ~ See the AUTHORS.txt file in the distribution for a full listing of 
  ~ individual contributors.
  ~
  ~ ModeShape is free software. Unless otherwise indicated, all code in ModeShape
  ~ is licensed to you under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ ModeShape is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
  ~ for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public License
  ~ along with this distribution; if not, write to:
  ~ Free Software Foundation, Inc.
  ~ 51 Franklin Street, Fifth Floor
  ~ Boston, MA  02110-1301  USA
  -->
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"	[
<!ENTITY % CustomDTD SYSTEM "../../custom.dtd">
%CustomDTD;
]>
<chapter id="aperture-mimetype-detector">
   <title>Aperture MIME type detector</title>
   <para>
   	The &ApertureMimeTypeDetector; class is an implementation of &MimeTypeDetector; that uses the
		<ulink url="http://aperture.sourceforge.net/">Aperture</ulink> 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.
   </para>
	<para>
		To use, simply include the <code>modeshape-mime-type-detector-aperture.jar</code> file on the classpath
		and create a new &ExecutionContext; subcontext with it:
	</para>
<programlisting>
&MimeTypeDetector; myDetector = new ApertureMimeTypeDetector();
&ExecutionContext; contextWithMyDetector = context.with(myDetector);
</programlisting>
</chapter>
