public class UniversalDetector
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
UniversalDetector.InputState |
Modifier and Type | Field and Description |
---|---|
static float |
MINIMUM_THRESHOLD |
static float |
SHORTCUT_THRESHOLD |
Constructor and Description |
---|
UniversalDetector(CharsetListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
dataEnd() |
java.lang.String |
getDetectedCharset() |
CharsetListener |
getListener() |
void |
handleData(byte[] buf,
int offset,
int length) |
boolean |
isDone() |
static void |
main(java.lang.String[] args) |
void |
reset() |
void |
setListener(CharsetListener listener) |
public static final float SHORTCUT_THRESHOLD
public static final float MINIMUM_THRESHOLD
public UniversalDetector(CharsetListener listener)
listener
- a listener object that is notified of
the detected encocoding. Can be null.public boolean isDone()
public java.lang.String getDetectedCharset()
public void setListener(CharsetListener listener)
public CharsetListener getListener()
public void handleData(byte[] buf, int offset, int length)
public void dataEnd()
public void reset()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Copyright © 2018. All rights reserved