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, mapCharset
protected static final int MAX_CHARSET_READAHEAD
public String sniff(Resource resource)
sniff
in interface EncodingSniffer
sniff
in class BaseEncodingSniffer
Copyright © 2005–2015 IIPC. All rights reserved.