You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2014/06/02 21:31:36 UTC
svn commit: r1599321 - in /tika/site: publish/1.0/ publish/1.1/ publish/1.2/
publish/1.3/ publish/1.4/ publish/1.5/ src/site/apt/1.0/ src/site/apt/1.1/
src/site/apt/1.2/ src/site/apt/1.3/ src/site/apt/1.4/ src/site/apt/1.5/
Author: nick
Date: Mon Jun 2 19:31:35 2014
New Revision: 1599321
URL: http://svn.apache.org/r1599321
Log:
Documentation patch from Tyler Palsulich from TIKA-1158 - correct the details of container aware detection on older releases
Modified:
tika/site/publish/1.0/detection.html
tika/site/publish/1.1/detection.html
tika/site/publish/1.2/detection.html
tika/site/publish/1.3/detection.html
tika/site/publish/1.4/detection.html
tika/site/publish/1.5/detection.html
tika/site/src/site/apt/1.0/detection.apt
tika/site/src/site/apt/1.1/detection.apt
tika/site/src/site/apt/1.2/detection.apt
tika/site/src/site/apt/1.3/detection.apt
tika/site/src/site/apt/1.4/detection.apt
tika/site/src/site/apt/1.5/detection.apt
Modified: tika/site/publish/1.0/detection.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.0/detection.html?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/publish/1.0/detection.html (original)
+++ tika/site/publish/1.0/detection.html Mon Jun 2 19:31:35 2014
@@ -126,9 +126,9 @@
<h3><a name="Container_Aware_Detection">Container Aware Detection</a></h3>
<p>Several common file formats are actually held within a common container format. One example is the PowerPoint .ppt and Word .doc formats, which are both held within an OLE2 container. Another is Apple iWork formats, which are actually a series of XML files within a Zip file.</p>
<p>Using magic detection, it is easy to spot that a given file is an OLE2 document, or a Zip file. Using magic detection alone, it is very difficult (and often impossible) to tell what kind of file lives inside the container.</p>
-<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, a container aware detector should be used.</p>
-<p>Tika provides a wrapping detector in the parsers bundle, of <a href="./api/org/apache/tika/detect/ContainerAwareDetector.html">org.apache.tika.detect.ContainerAwareDetector</a>. This detector will check for certain known containers, and if found, will open them and detect the appropriate type based on the contents. If the file isn't a known container, it will fall back to another detector for the answer (most commonly the default <tt>MimeTypes</tt> detector)</p>
-<p>Because this detector needs to read the whole file to process the container, it must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the fallback detector.</p>
+<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, the additional container aware detectors contained in the <tt>Tika Parsers</tt> jar should be used.</p>
+<p>Tika provides a wrapping detector in the form of <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a>. This uses the service loader to discover all available detectors, including any available container aware ones, and tries them in turn. For container aware detection, include the <tt>Tika Parsers</tt> jar and its dependencies in your project, then use DefaultDetector along with a <tt>TikaInputStream</tt>.</p>
+<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p>
<p>For more information on container formats and Tika, see <a class="externalLink" href="http://wiki.apache.org/tika/MetadataDiscussion"></a></p></div>
<div class="section">
<h3><a name="Language_Detection">Language Detection</a></h3>
Modified: tika/site/publish/1.1/detection.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.1/detection.html?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/publish/1.1/detection.html (original)
+++ tika/site/publish/1.1/detection.html Mon Jun 2 19:31:35 2014
@@ -126,9 +126,9 @@
<h3><a name="Container_Aware_Detection">Container Aware Detection</a></h3>
<p>Several common file formats are actually held within a common container format. One example is the PowerPoint .ppt and Word .doc formats, which are both held within an OLE2 container. Another is Apple iWork formats, which are actually a series of XML files within a Zip file.</p>
<p>Using magic detection, it is easy to spot that a given file is an OLE2 document, or a Zip file. Using magic detection alone, it is very difficult (and often impossible) to tell what kind of file lives inside the container.</p>
-<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, container aware detectors should be used.</p>
-<p>Tika provides a number of container aware detectors, which cover the main container formats (OLE2, Zip etc). It is possible to call these detectors individually, but it is more common to use <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a> to handle this for you. DefaultDetector works like DefaultParser, and locates available Detectors using the Services Loader, and then tries each in turn to identify the file. If the file isn't a known container, and no specific Detector identifies it, the default <tt>MimeTypes</tt> detector will be used to perform Magic Based Detection.</p>
-<p>Because the container aware detectors needs to read the whole file in order to process the surrounding container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the <tt>MimeTypes</tt> detector.</p>
+<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, the additional container aware detectors contained in the <tt>Tika Parsers</tt> jar should be used.</p>
+<p>Tika provides a wrapping detector in the form of <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a>. This uses the service loader to discover all available detectors, including any available container aware ones, and tries them in turn. For container aware detection, include the <tt>Tika Parsers</tt> jar and its dependencies in your project, then use DefaultDetector along with a <tt>TikaInputStream</tt>.</p>
+<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p>
<p>For more information on container formats and Tika, see <a class="externalLink" href="http://wiki.apache.org/tika/MetadataDiscussion"></a></p></div>
<div class="section">
<h3><a name="Language_Detection">Language Detection</a></h3>
Modified: tika/site/publish/1.2/detection.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.2/detection.html?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/publish/1.2/detection.html (original)
+++ tika/site/publish/1.2/detection.html Mon Jun 2 19:31:35 2014
@@ -126,9 +126,9 @@
<h3><a name="Container_Aware_Detection">Container Aware Detection</a></h3>
<p>Several common file formats are actually held within a common container format. One example is the PowerPoint .ppt and Word .doc formats, which are both held within an OLE2 container. Another is Apple iWork formats, which are actually a series of XML files within a Zip file.</p>
<p>Using magic detection, it is easy to spot that a given file is an OLE2 document, or a Zip file. Using magic detection alone, it is very difficult (and often impossible) to tell what kind of file lives inside the container.</p>
-<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, container aware detectors should be used.</p>
-<p>Tika provides a number of container aware detectors, which cover the main container formats (OLE2, Zip etc). It is possible to call these detectors individually, but it is more common to use <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a> to handle this for you. DefaultDetector works like DefaultParser, and locates available Detectors using the Services Loader, and then tries each in turn to identify the file. If the file isn't a known container, and no specific Detector identifies it, the default <tt>MimeTypes</tt> detector will be used to perform Magic Based Detection.</p>
-<p>Because the container aware detectors needs to read the whole file in order to process the surrounding container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the <tt>MimeTypes</tt> detector.</p>
+<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, the additional container aware detectors contained in the <tt>Tika Parsers</tt> jar should be used.</p>
+<p>Tika provides a wrapping detector in the form of <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a>. This uses the service loader to discover all available detectors, including any available container aware ones, and tries them in turn. For container aware detection, include the <tt>Tika Parsers</tt> jar and its dependencies in your project, then use DefaultDetector along with a <tt>TikaInputStream</tt>.</p>
+<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p>
<p>For more information on container formats and Tika, see <a class="externalLink" href="http://wiki.apache.org/tika/MetadataDiscussion"></a></p></div>
<div class="section">
<h3><a name="Language_Detection">Language Detection</a></h3>
Modified: tika/site/publish/1.3/detection.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.3/detection.html?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/publish/1.3/detection.html (original)
+++ tika/site/publish/1.3/detection.html Mon Jun 2 19:31:35 2014
@@ -126,9 +126,9 @@
<h3><a name="Container_Aware_Detection">Container Aware Detection</a></h3>
<p>Several common file formats are actually held within a common container format. One example is the PowerPoint .ppt and Word .doc formats, which are both held within an OLE2 container. Another is Apple iWork formats, which are actually a series of XML files within a Zip file.</p>
<p>Using magic detection, it is easy to spot that a given file is an OLE2 document, or a Zip file. Using magic detection alone, it is very difficult (and often impossible) to tell what kind of file lives inside the container.</p>
-<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, a container aware detector should be used.</p>
-<p>Tika provides a wrapping detector in the parsers bundle, of <a href="./api/org/apache/tika/detect/ContainerAwareDetector.html">org.apache.tika.detect.ContainerAwareDetector</a>. This detector will check for certain known containers, and if found, will open them and detect the appropriate type based on the contents. If the file isn't a known container, it will fall back to another detector for the answer (most commonly the default <tt>MimeTypes</tt> detector)</p>
-<p>Because this detector needs to read the whole file to process the container, it must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the fallback detector.</p>
+<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, the additional container aware detectors contained in the <tt>Tika Parsers</tt> jar should be used.</p>
+<p>Tika provides a wrapping detector in the form of <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a>. This uses the service loader to discover all available detectors, including any available container aware ones, and tries them in turn. For container aware detection, include the <tt>Tika Parsers</tt> jar and its dependencies in your project, then use DefaultDetector along with a <tt>TikaInputStream</tt>.</p>
+<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p>
<p>For more information on container formats and Tika, see <a class="externalLink" href="http://wiki.apache.org/tika/MetadataDiscussion"></a></p></div>
<div class="section">
<h3><a name="Language_Detection">Language Detection</a></h3>
Modified: tika/site/publish/1.4/detection.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.4/detection.html?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/publish/1.4/detection.html (original)
+++ tika/site/publish/1.4/detection.html Mon Jun 2 19:31:35 2014
@@ -126,9 +126,9 @@
<h3><a name="Container_Aware_Detection">Container Aware Detection</a></h3>
<p>Several common file formats are actually held within a common container format. One example is the PowerPoint .ppt and Word .doc formats, which are both held within an OLE2 container. Another is Apple iWork formats, which are actually a series of XML files within a Zip file.</p>
<p>Using magic detection, it is easy to spot that a given file is an OLE2 document, or a Zip file. Using magic detection alone, it is very difficult (and often impossible) to tell what kind of file lives inside the container.</p>
-<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, a container aware detector should be used.</p>
-<p>Tika provides a wrapping detector in the parsers bundle, of <a href="./api/org/apache/tika/detect/ContainerAwareDetector.html">org.apache.tika.detect.ContainerAwareDetector</a>. This detector will check for certain known containers, and if found, will open them and detect the appropriate type based on the contents. If the file isn't a known container, it will fall back to another detector for the answer (most commonly the default <tt>MimeTypes</tt> detector)</p>
-<p>Because this detector needs to read the whole file to process the container, it must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the fallback detector.</p>
+<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, the additional container aware detectors contained in the <tt>Tika Parsers</tt> jar should be used.</p>
+<p>Tika provides a wrapping detector in the form of <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a>. This uses the service loader to discover all available detectors, including any available container aware ones, and tries them in turn. For container aware detection, include the <tt>Tika Parsers</tt> jar and its dependencies in your project, then use DefaultDetector along with a <tt>TikaInputStream</tt>.</p>
+<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p>
<p>For more information on container formats and Tika, see <a class="externalLink" href="http://wiki.apache.org/tika/MetadataDiscussion"></a></p></div>
<div class="section">
<h3><a name="Language_Detection">Language Detection</a></h3>
Modified: tika/site/publish/1.5/detection.html
URL: http://svn.apache.org/viewvc/tika/site/publish/1.5/detection.html?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/publish/1.5/detection.html (original)
+++ tika/site/publish/1.5/detection.html Mon Jun 2 19:31:35 2014
@@ -130,7 +130,8 @@
<p>Using magic detection, it is easy to spot that a given file is an OLE2 document, or a Zip file. Using magic detection alone, it is very difficult (and often impossible) to tell what kind of file lives inside the container.</p>
<p>For some use cases, speed is important, so having a quick way to know the container type is sufficient. For other cases however, you don't mind spending a bit of time (and memory!) processing the container to get a more accurate answer on its contents. For these cases, the additional container aware detectors contained in the <tt>Tika Parsers</tt> jar should be used.</p>
<p>Tika provides a wrapping detector in the form of <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a>. This uses the service loader to discover all available detectors, including any available container aware ones, and tries them in turn. For container aware detection, include the <tt>Tika Parsers</tt> jar and its dependencies in your project, then use DefaultDetector along with a <tt>TikaInputStream</tt>.</p>
-<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p></div>
+<p>Because these container detectors needs to read the whole file to open and inspect the container, they must be used with a <a href="./api/org/apache/tika/io/TikaInputStream.html">org.apache.tika.io.TikaInputStream</a>. If called with a regular <tt>InputStream</tt>, then all work will be done by the default Mime Magic detection only.</p>
+<p>For more information on container formats and Tika, see <a class="externalLink" href="http://wiki.apache.org/tika/MetadataDiscussion"></a></p></div>
<div class="section">
<h3><a name="The_default_Tika_Detector">The default Tika Detector</a></h3>
<p>Just as with Parsers, Tika provides a special detector <a href="./api/org/apache/tika/detect/DefaultDetector.html">org.apache.tika.detect.DefaultDetector</a> which auto-detects (based on service files) the available detectors at runtime, and tries these in turn to identify the file type.</p>
Modified: tika/site/src/site/apt/1.0/detection.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.0/detection.apt?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/src/site/apt/1.0/detection.apt (original)
+++ tika/site/src/site/apt/1.0/detection.apt Mon Jun 2 19:31:35 2014
@@ -121,22 +121,22 @@ MediaType detect(java.io.InputStream inp
For some use cases, speed is important, so having a quick way to know the
container type is sufficient. For other cases however, you don't mind
spending a bit of time (and memory!) processing the container to get a
- more accurate answer on its contents. For these cases, a container
- aware detector should be used.
+ more accurate answer on its contents. For these cases, the additional
+ container aware detectors contained in the <<<Tika Parsers>>> jar should
+ be used.
+
+ Tika provides a wrapping detector in the form of
+ {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}.
+ This uses the service loader to discover all available detectors, including
+ any available container aware ones, and tries them in turn. For container
+ aware detection, include the <<<Tika Parsers>>> jar and its dependencies
+ in your project, then use DefaultDetector along with a <<<TikaInputStream>>>.
- Tika provides a wrapping detector in the parsers bundle, of
- {{{./api/org/apache/tika/detect/ContainerAwareDetector.html}org.apache.tika.detect.ContainerAwareDetector}}.
- This detector will check for certain known containers, and if found,
- will open them and detect the appropriate type based on the contents.
- If the file isn't a known container, it will fall back to another
- detector for the answer (most commonly the default
- <<<MimeTypes>>> detector)
-
- Because this detector needs to read the whole file to process the
- container, it must be used with a
+ Because these container detectors needs to read the whole file to open and
+ inspect the container, they must be used with a
{{{./api/org/apache/tika/io/TikaInputStream.html}org.apache.tika.io.TikaInputStream}}.
If called with a regular <<<InputStream>>>, then all work will be done
- by the fallback detector.
+ by the default Mime Magic detection only.
For more information on container formats and Tika, see
{{{http://wiki.apache.org/tika/MetadataDiscussion}}}
Modified: tika/site/src/site/apt/1.1/detection.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.1/detection.apt?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/src/site/apt/1.1/detection.apt (original)
+++ tika/site/src/site/apt/1.1/detection.apt Mon Jun 2 19:31:35 2014
@@ -121,24 +121,22 @@ MediaType detect(java.io.InputStream inp
For some use cases, speed is important, so having a quick way to know the
container type is sufficient. For other cases however, you don't mind
spending a bit of time (and memory!) processing the container to get a
- more accurate answer on its contents. For these cases, container
- aware detectors should be used.
+ more accurate answer on its contents. For these cases, the additional
+ container aware detectors contained in the <<<Tika Parsers>>> jar should
+ be used.
+
+ Tika provides a wrapping detector in the form of
+ {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}.
+ This uses the service loader to discover all available detectors, including
+ any available container aware ones, and tries them in turn. For container
+ aware detection, include the <<<Tika Parsers>>> jar and its dependencies
+ in your project, then use DefaultDetector along with a <<<TikaInputStream>>>.
- Tika provides a number of container aware detectors, which cover the
- main container formats (OLE2, Zip etc). It is possible to call
- these detectors individually, but it is more common to use
- {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}
- to handle this for you. DefaultDetector works like DefaultParser,
- and locates available Detectors using the Services Loader, and then
- tries each in turn to identify the file. If the file isn't a known container,
- and no specific Detector identifies it, the default
- <<<MimeTypes>>> detector will be used to perform Magic Based Detection.
-
- Because the container aware detectors needs to read the whole file in order
- to process the surrounding container, they must be used with a
+ Because these container detectors needs to read the whole file to open and
+ inspect the container, they must be used with a
{{{./api/org/apache/tika/io/TikaInputStream.html}org.apache.tika.io.TikaInputStream}}.
If called with a regular <<<InputStream>>>, then all work will be done
- by the <<<MimeTypes>>> detector.
+ by the default Mime Magic detection only.
For more information on container formats and Tika, see
{{{http://wiki.apache.org/tika/MetadataDiscussion}}}
Modified: tika/site/src/site/apt/1.2/detection.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.2/detection.apt?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/src/site/apt/1.2/detection.apt (original)
+++ tika/site/src/site/apt/1.2/detection.apt Mon Jun 2 19:31:35 2014
@@ -121,24 +121,22 @@ MediaType detect(java.io.InputStream inp
For some use cases, speed is important, so having a quick way to know the
container type is sufficient. For other cases however, you don't mind
spending a bit of time (and memory!) processing the container to get a
- more accurate answer on its contents. For these cases, container
- aware detectors should be used.
+ more accurate answer on its contents. For these cases, the additional
+ container aware detectors contained in the <<<Tika Parsers>>> jar should
+ be used.
+
+ Tika provides a wrapping detector in the form of
+ {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}.
+ This uses the service loader to discover all available detectors, including
+ any available container aware ones, and tries them in turn. For container
+ aware detection, include the <<<Tika Parsers>>> jar and its dependencies
+ in your project, then use DefaultDetector along with a <<<TikaInputStream>>>.
- Tika provides a number of container aware detectors, which cover the
- main container formats (OLE2, Zip etc). It is possible to call
- these detectors individually, but it is more common to use
- {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}
- to handle this for you. DefaultDetector works like DefaultParser,
- and locates available Detectors using the Services Loader, and then
- tries each in turn to identify the file. If the file isn't a known container,
- and no specific Detector identifies it, the default
- <<<MimeTypes>>> detector will be used to perform Magic Based Detection.
-
- Because the container aware detectors needs to read the whole file in order
- to process the surrounding container, they must be used with a
+ Because these container detectors needs to read the whole file to open and
+ inspect the container, they must be used with a
{{{./api/org/apache/tika/io/TikaInputStream.html}org.apache.tika.io.TikaInputStream}}.
If called with a regular <<<InputStream>>>, then all work will be done
- by the <<<MimeTypes>>> detector.
+ by the default Mime Magic detection only.
For more information on container formats and Tika, see
{{{http://wiki.apache.org/tika/MetadataDiscussion}}}
Modified: tika/site/src/site/apt/1.3/detection.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.3/detection.apt?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/src/site/apt/1.3/detection.apt (original)
+++ tika/site/src/site/apt/1.3/detection.apt Mon Jun 2 19:31:35 2014
@@ -121,22 +121,22 @@ MediaType detect(java.io.InputStream inp
For some use cases, speed is important, so having a quick way to know the
container type is sufficient. For other cases however, you don't mind
spending a bit of time (and memory!) processing the container to get a
- more accurate answer on its contents. For these cases, a container
- aware detector should be used.
+ more accurate answer on its contents. For these cases, the additional
+ container aware detectors contained in the <<<Tika Parsers>>> jar should
+ be used.
+
+ Tika provides a wrapping detector in the form of
+ {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}.
+ This uses the service loader to discover all available detectors, including
+ any available container aware ones, and tries them in turn. For container
+ aware detection, include the <<<Tika Parsers>>> jar and its dependencies
+ in your project, then use DefaultDetector along with a <<<TikaInputStream>>>.
- Tika provides a wrapping detector in the parsers bundle, of
- {{{./api/org/apache/tika/detect/ContainerAwareDetector.html}org.apache.tika.detect.ContainerAwareDetector}}.
- This detector will check for certain known containers, and if found,
- will open them and detect the appropriate type based on the contents.
- If the file isn't a known container, it will fall back to another
- detector for the answer (most commonly the default
- <<<MimeTypes>>> detector)
-
- Because this detector needs to read the whole file to process the
- container, it must be used with a
+ Because these container detectors needs to read the whole file to open and
+ inspect the container, they must be used with a
{{{./api/org/apache/tika/io/TikaInputStream.html}org.apache.tika.io.TikaInputStream}}.
If called with a regular <<<InputStream>>>, then all work will be done
- by the fallback detector.
+ by the default Mime Magic detection only.
For more information on container formats and Tika, see
{{{http://wiki.apache.org/tika/MetadataDiscussion}}}
Modified: tika/site/src/site/apt/1.4/detection.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.4/detection.apt?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/src/site/apt/1.4/detection.apt (original)
+++ tika/site/src/site/apt/1.4/detection.apt Mon Jun 2 19:31:35 2014
@@ -106,7 +106,6 @@ MediaType detect(java.io.InputStream inp
if available, the supplied content type (from <<<Metadata.CONTENT_TYPE>>>)
is used to further refine the type.
-
* {Container Aware Detection}
Several common file formats are actually held within a common container
@@ -121,22 +120,22 @@ MediaType detect(java.io.InputStream inp
For some use cases, speed is important, so having a quick way to know the
container type is sufficient. For other cases however, you don't mind
spending a bit of time (and memory!) processing the container to get a
- more accurate answer on its contents. For these cases, a container
- aware detector should be used.
-
- Tika provides a wrapping detector in the parsers bundle, of
- {{{./api/org/apache/tika/detect/ContainerAwareDetector.html}org.apache.tika.detect.ContainerAwareDetector}}.
- This detector will check for certain known containers, and if found,
- will open them and detect the appropriate type based on the contents.
- If the file isn't a known container, it will fall back to another
- detector for the answer (most commonly the default
- <<<MimeTypes>>> detector)
+ more accurate answer on its contents. For these cases, the additional
+ container aware detectors contained in the <<<Tika Parsers>>> jar should
+ be used.
+
+ Tika provides a wrapping detector in the form of
+ {{{./api/org/apache/tika/detect/DefaultDetector.html}org.apache.tika.detect.DefaultDetector}}.
+ This uses the service loader to discover all available detectors, including
+ any available container aware ones, and tries them in turn. For container
+ aware detection, include the <<<Tika Parsers>>> jar and its dependencies
+ in your project, then use DefaultDetector along with a <<<TikaInputStream>>>.
- Because this detector needs to read the whole file to process the
- container, it must be used with a
+ Because these container detectors needs to read the whole file to open and
+ inspect the container, they must be used with a
{{{./api/org/apache/tika/io/TikaInputStream.html}org.apache.tika.io.TikaInputStream}}.
If called with a regular <<<InputStream>>>, then all work will be done
- by the fallback detector.
+ by the default Mime Magic detection only.
For more information on container formats and Tika, see
{{{http://wiki.apache.org/tika/MetadataDiscussion}}}
Modified: tika/site/src/site/apt/1.5/detection.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/1.5/detection.apt?rev=1599321&r1=1599320&r2=1599321&view=diff
==============================================================================
--- tika/site/src/site/apt/1.5/detection.apt (original)
+++ tika/site/src/site/apt/1.5/detection.apt Mon Jun 2 19:31:35 2014
@@ -141,6 +141,9 @@ MediaType detect(java.io.InputStream inp
If called with a regular <<<InputStream>>>, then all work will be done
by the default Mime Magic detection only.
+ For more information on container formats and Tika, see
+ {{{http://wiki.apache.org/tika/MetadataDiscussion}}}
+
* {The default Tika Detector}