org.mozilla.universalchardet
Class UniversalDetector
java.lang.Object
org.mozilla.universalchardet.UniversalDetector
public class UniversalDetector
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHORTCUT_THRESHOLD
public static final float SHORTCUT_THRESHOLD
- See Also:
- Constant Field Values
MINIMUM_THRESHOLD
public static final float MINIMUM_THRESHOLD
- See Also:
- Constant Field Values
UniversalDetector
public UniversalDetector(CharsetListener listener)
- Parameters:
listener - a listener object that is notified of
the detected encocoding. Can be null.
isDone
public boolean isDone()
getDetectedCharset
public String getDetectedCharset()
- Returns:
- The detected encoding is returned. If the detector couldn't
determine what encoding was used, null is returned.
setListener
public void setListener(CharsetListener listener)
getListener
public CharsetListener getListener()
handleData
public void handleData(byte[] buf,
int offset,
int length)
dataEnd
public void dataEnd()
reset
public void reset()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2011. All Rights Reserved.