Package org.apache.tika.detect
Class DefaultEncodingDetector
java.lang.Object
org.apache.tika.detect.CompositeEncodingDetector
org.apache.tika.detect.DefaultEncodingDetector
- All Implemented Interfaces:
Serializable,SelfConfiguring,EncodingDetector
A composite encoding detector based on all the
EncodingDetector
implementations available through the
service provider mechanism.
The default chain (Tika 3.x style) runs three detectors in order, with the first non-empty result winning:
org.apache.tika.parser.html.HtmlEncodingDetectororg.apache.tika.parser.txt.UniversalEncodingDetectororg.apache.tika.parser.txt.Icu4jEncodingDetector
EncodingDetector discovered via SPI (e.g.,
user-supplied detectors) runs after the three blessed detectors,
preserving back-compat for callers who add their own.
If you need to control the order of the Detectors explicitly, construct
your own CompositeEncodingDetector and pass in the list in the
required order.
- Since:
- Apache Tika 1.15
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultEncodingDetector(ServiceLoader loader) DefaultEncodingDetector(ServiceLoader loader, Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors) -
Method Summary
Methods inherited from class org.apache.tika.detect.CompositeEncodingDetector
detect, getDetectors
-
Constructor Details
-
DefaultEncodingDetector
public DefaultEncodingDetector() -
DefaultEncodingDetector
-
DefaultEncodingDetector
public DefaultEncodingDetector(ServiceLoader loader, Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors)
-