public class OrderedContentTypeDetector extends java.lang.Object implements ContentTypeDetector
HeadersContentTypeDetector
and UrlFileExtensionTypeDetector
Can accept a list of content type detectors
FilterEngine.ContentType#XMLHTTPREQUEST is detected separately
just by checking header `HEADER_REQUESTED_WITH_XMLHTTPREQUEST`
| Constructor and Description |
|---|
OrderedContentTypeDetector(ContentTypeDetector... detectors)
Creates an instance of a `MultipleContentTypeDetector`
with provided detectors
|
| Modifier and Type | Method and Description |
|---|---|
org.adblockplus.libadblockplus.FilterEngine.ContentType |
detect(android.webkit.WebResourceRequest request)
Detects ContentType for given URL and headers
|
public OrderedContentTypeDetector(ContentTypeDetector... detectors)
At the moment only HeadersContentTypeDetector
and UrlFileExtensionTypeDetector exists
detectors - an array of instances of ContentTypeDetectorpublic org.adblockplus.libadblockplus.FilterEngine.ContentType detect(android.webkit.WebResourceRequest request)
ContentTypeDetectordetect in interface ContentTypeDetectorrequest - WebResourceRequest that contains all required
info HTTP headers of incoming request including url and headers