Package org.mozilla.universalchardet
Class UniversalDetector
java.lang.Object
org.mozilla.universalchardet.UniversalDetector
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dataEnd()
void
handleData
(byte[] buf, int offset, int length) boolean
isDone()
static void
void
reset()
void
setListener
(CharsetListener listener)
-
Field Details
-
SHORTCUT_THRESHOLD
public static final float SHORTCUT_THRESHOLD- See Also:
-
MINIMUM_THRESHOLD
public static final float MINIMUM_THRESHOLD- See Also:
-
-
Constructor Details
-
UniversalDetector
- Parameters:
listener
- a listener object that is notified of the detected encocoding. Can be null.
-
-
Method Details
-
isDone
public boolean isDone() -
getDetectedCharset
- Returns:
- The detected encoding is returned. If the detector couldn't determine what encoding was used, null is returned.
-
setListener
-
getListener
-
handleData
public void handleData(byte[] buf, int offset, int length) -
dataEnd
public void dataEnd() -
reset
public void reset() -
main
- Throws:
Exception
-