Package org.apache.tika.detect
Interface MetaEncodingDetector
- All Superinterfaces:
EncodingDetector,SelfConfiguring,Serializable
- All Known Implementing Classes:
JunkFilterEncodingDetector
Marker interface for encoding detectors that arbitrate among
candidates collected by base detectors rather than detecting
encoding directly from the stream.
When a MetaEncodingDetector is present in a
CompositeEncodingDetector, the composite switches from
first-match-wins to collect-all mode: all base detectors run
first and their results are collected in an
EncodingDetectorContext, then the meta detector's
EncodingDetector.detect(org.apache.tika.io.TikaInputStream, org.apache.tika.metadata.Metadata, org.apache.tika.parser.ParseContext) method is called to pick the winner.
The EncodingDetectorContext is placed in the
ParseContext before the meta
detector is invoked, so implementations can retrieve it via
parseContext.get(EncodingDetectorContext.class).
- Since:
- Apache Tika 3.2
-
Method Summary
Methods inherited from interface org.apache.tika.detect.EncodingDetector
detect