public abstract class CharsetDetector extends Object
Actual character encoding sniffing algorithm steps are
now implemented by EncodingSniffer.
EncodingSniffer| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET
the default charset name to use when giving up
|
| Constructor and Description |
|---|
CharsetDetector() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getCharset(Resource httpHeadersResource,
Resource payloadResource,
WaybackRequest wbRequest) |
String |
getCharset(Resource resource,
WaybackRequest request) |
public static final String DEFAULT_CHARSET
public String getCharset(Resource resource, WaybackRequest request) throws IOException
resource - Resource whose charset encoding is to be detected.request - WaybackRequest which may contain additional hints to
processingnullIOException - if there are problems reading the Resourcepublic abstract String getCharset(Resource httpHeadersResource, Resource payloadResource, WaybackRequest wbRequest) throws IOException
httpHeadersResource - resource with http headers to considerpayloadResource - resource with payload to consider (presumably text)request - WaybackRequest which may contain additional hints to
processingnulIOException - if there are problems reading the ResourceCopyright © 2005–2017 IIPC. All rights reserved.