public class RotatingCharsetDetector extends CharsetDetector
Modifier and Type | Field and Description |
---|---|
static int |
GUESS_TYPES |
static int |
MODE_COUNT |
static int[][] |
MODES |
DEFAULT_CHARSET
Constructor and Description |
---|
RotatingCharsetDetector() |
Modifier and Type | Method and Description |
---|---|
String |
getCharset(Resource resource,
int mode) |
String |
getCharset(Resource httpHeadersResource,
Resource payloadResource,
int mode) |
String |
getCharset(Resource httpHeadersResource,
Resource payloadResource,
WaybackRequest request) |
int |
nextMode(int curMode) |
getCharset
public static final int[][] MODES
public static final int MODE_COUNT
public static final int GUESS_TYPES
public int nextMode(int curMode)
public String getCharset(Resource httpHeadersResource, Resource payloadResource, int mode) throws IOException
IOException
public String getCharset(Resource resource, int mode) throws IOException
IOException
public String getCharset(Resource httpHeadersResource, Resource payloadResource, WaybackRequest request) throws IOException
getCharset
in class CharsetDetector
httpHeadersResource
- resource with http headers to considerpayloadResource
- resource with payload to consider (presumably text)nul
IOException
- if there are problems reading the ResourceCopyright © 2005–2015 IIPC. All rights reserved.