org.archive.wayback.replay.charset
Class RotatingCharsetDetector
java.lang.Object
org.archive.wayback.replay.charset.CharsetDetector
org.archive.wayback.replay.charset.RotatingCharsetDetector
public class RotatingCharsetDetector
- extends CharsetDetector
- Author:
- brad
Provides a way to rotate through several detection schemes
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MODES
public static final int[][] MODES
MODE_COUNT
public static final int MODE_COUNT
- See Also:
- Constant Field Values
GUESS_TYPES
public static final int GUESS_TYPES
- See Also:
- Constant Field Values
RotatingCharsetDetector
public RotatingCharsetDetector()
nextMode
public int nextMode(int curMode)
getCharsetType
public String getCharsetType(Resource resource,
int type)
throws IOException
- Throws:
IOException
getCharset
public String getCharset(Resource resource,
int mode)
throws IOException
- Throws:
IOException
getCharset
public String getCharset(Resource resource,
WaybackRequest request)
throws IOException
- Specified by:
getCharset in class CharsetDetector
- Parameters:
resource - (presumably text) Resource to determine the charsetrequest - WaybackRequest which may contain additional hints to
processing
- Returns:
- String charset name for the Resource
- Throws:
IOException - if there are problems reading the Resource
Copyright © 2005-2011 Internet Archive. All Rights Reserved.