Class DefaultEncodingDetector

java.lang.Object
org.apache.tika.detect.CompositeEncodingDetector
org.apache.tika.detect.DefaultEncodingDetector
All Implemented Interfaces:
Serializable, SelfConfiguring, EncodingDetector

public class DefaultEncodingDetector extends CompositeEncodingDetector
A composite encoding detector over all EncodingDetector implementations available through the service provider mechanism.

The 4.x default chain (via META-INF/services): BOM and metadata-charset detectors (tika-core), the HTML <meta> detector, MojibusterEncodingDetector, and JunkFilterEncodingDetector — a MetaEncodingDetector that arbitrates the candidates by decode quality and always runs last, so detector order is irrelevant.

UniversalEncodingDetector and Icu4jEncodingDetector are no longer distributed by default and are not auto-discovered; add the jar and enable them in a tika-config to use them.

Since:
Apache Tika 1.15
See Also:
  • Constructor Details

    • DefaultEncodingDetector

      public DefaultEncodingDetector()
    • DefaultEncodingDetector

      public DefaultEncodingDetector(ServiceLoader loader)
    • DefaultEncodingDetector

      public DefaultEncodingDetector(ServiceLoader loader, Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors)