Class CharsetProber
- java.lang.Object
-
- org.mozilla.universalchardet.prober.CharsetProber
-
- Direct Known Subclasses:
Big5Prober,EscCharsetProber,EUCJPProber,EUCKRProber,EUCTWProber,GB18030Prober,HebrewProber,Latin1Prober,MBCSGroupProber,SBCSGroupProber,SingleByteCharsetProber,SJISProber,UTF8Prober
public abstract class CharsetProber extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCharsetProber.ProbingState
-
Field Summary
Fields Modifier and Type Field Description static intASCII_Astatic intASCII_A_CAPITALstatic intASCII_GTstatic intASCII_LTstatic intASCII_SPstatic intASCII_Zstatic intASCII_Z_CAPITALstatic floatSHORTCUT_THRESHOLD
-
Constructor Summary
Constructors Constructor Description CharsetProber()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static java.nio.ByteBufferfilterWithEnglishLetters(byte[] buf, int offset, int length)static java.nio.ByteBufferfilterWithoutEnglishLetters(byte[] buf, int offset, int length)abstract java.lang.StringgetCharSetName()abstract floatgetConfidence()abstract CharsetProber.ProbingStategetState()abstract CharsetProber.ProbingStatehandleData(byte[] buf, int offset, int length)private static booleanisAscii(byte b)private static booleanisAsciiSymbol(byte b)abstract voidreset()abstract voidsetOption()
-
-
-
Field Detail
-
SHORTCUT_THRESHOLD
public static final float SHORTCUT_THRESHOLD
- See Also:
- Constant Field Values
-
ASCII_A
public static final int ASCII_A
- See Also:
- Constant Field Values
-
ASCII_Z
public static final int ASCII_Z
- See Also:
- Constant Field Values
-
ASCII_A_CAPITAL
public static final int ASCII_A_CAPITAL
- See Also:
- Constant Field Values
-
ASCII_Z_CAPITAL
public static final int ASCII_Z_CAPITAL
- See Also:
- Constant Field Values
-
ASCII_LT
public static final int ASCII_LT
- See Also:
- Constant Field Values
-
ASCII_GT
public static final int ASCII_GT
- See Also:
- Constant Field Values
-
ASCII_SP
public static final int ASCII_SP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCharSetName
public abstract java.lang.String getCharSetName()
-
handleData
public abstract CharsetProber.ProbingState handleData(byte[] buf, int offset, int length)
-
getState
public abstract CharsetProber.ProbingState getState()
-
reset
public abstract void reset()
-
getConfidence
public abstract float getConfidence()
-
setOption
public abstract void setOption()
-
filterWithoutEnglishLetters
public static java.nio.ByteBuffer filterWithoutEnglishLetters(byte[] buf, int offset, int length)
-
filterWithEnglishLetters
public static java.nio.ByteBuffer filterWithEnglishLetters(byte[] buf, int offset, int length)
-
isAscii
private static boolean isAscii(byte b)
-
isAsciiSymbol
private static boolean isAsciiSymbol(byte b)
-
-