public class UniversalChardetSniffer extends BaseEncodingSniffer
EncodingSniffer that runs UniversalDetector on
the content.
Note: as of version 1.0.3, UniversalDetector returns null
for ASCII-only text encoded as either UTF-8 or UTF-16.
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_CHARSET_READAHEAD |
CHARSET_TOKEN, HTTP_CONTENT_TYPE_HEADER| Constructor and Description |
|---|
UniversalChardetSniffer() |
| Modifier and Type | Method and Description |
|---|---|
String |
sniff(Resource resource) |
contentTypeToCharset, isCharsetSupported, mapCharsetprotected static final int MAX_CHARSET_READAHEAD
public String sniff(Resource resource)
sniff in interface EncodingSniffersniff in class BaseEncodingSnifferCopyright © 2005–2015 IIPC. All rights reserved.