Package org.mozilla.intl.chardet
Class nsPSMDetector
- java.lang.Object
-
- org.mozilla.intl.chardet.nsPSMDetector
-
- Direct Known Subclasses:
nsDetector
public abstract class nsPSMDetector extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALL
static int
CHINESE
static int
JAPANESE
static int
KOREAN
static int
MAX_VERIFIERS
(package private) int
mClassItems
(package private) boolean
mClassRunSampler
(package private) boolean
mDone
(package private) int[]
mItemIdx
(package private) int
mItems
(package private) boolean
mRunSampler
(package private) nsEUCSampler
mSampler
(package private) byte[]
mState
(package private) nsEUCStatistics[]
mStatisticsData
(package private) nsVerifier[]
mVerifier
static int
NO_OF_LANGUAGES
static int
SIMPLIFIED_CHINESE
static int
TRADITIONAL_CHINESE
-
Constructor Summary
Constructors Constructor Description nsPSMDetector()
nsPSMDetector(int langFlag)
nsPSMDetector(int aItems, nsVerifier[] aVerifierSet, nsEUCStatistics[] aStatisticsSet)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
DataEnd()
java.lang.String[]
getProbableCharsets()
boolean
HandleData(byte[] aBuf, int len)
protected void
initVerifiers(int currVerSet)
abstract void
Report(java.lang.String charset)
void
Reset()
void
Sample(byte[] aBuf, int aLen)
void
Sample(byte[] aBuf, int aLen, boolean aLastChance)
-
-
-
Field Detail
-
ALL
public static final int ALL
- See Also:
- Constant Field Values
-
JAPANESE
public static final int JAPANESE
- See Also:
- Constant Field Values
-
CHINESE
public static final int CHINESE
- See Also:
- Constant Field Values
-
SIMPLIFIED_CHINESE
public static final int SIMPLIFIED_CHINESE
- See Also:
- Constant Field Values
-
TRADITIONAL_CHINESE
public static final int TRADITIONAL_CHINESE
- See Also:
- Constant Field Values
-
KOREAN
public static final int KOREAN
- See Also:
- Constant Field Values
-
NO_OF_LANGUAGES
public static final int NO_OF_LANGUAGES
- See Also:
- Constant Field Values
-
MAX_VERIFIERS
public static final int MAX_VERIFIERS
- See Also:
- Constant Field Values
-
mVerifier
nsVerifier[] mVerifier
-
mStatisticsData
nsEUCStatistics[] mStatisticsData
-
mSampler
nsEUCSampler mSampler
-
mState
byte[] mState
-
mItemIdx
int[] mItemIdx
-
mItems
int mItems
-
mClassItems
int mClassItems
-
mDone
boolean mDone
-
mRunSampler
boolean mRunSampler
-
mClassRunSampler
boolean mClassRunSampler
-
-
Constructor Detail
-
nsPSMDetector
public nsPSMDetector()
-
nsPSMDetector
public nsPSMDetector(int langFlag)
-
nsPSMDetector
public nsPSMDetector(int aItems, nsVerifier[] aVerifierSet, nsEUCStatistics[] aStatisticsSet)
-
-
Method Detail
-
Reset
public void Reset()
-
initVerifiers
protected void initVerifiers(int currVerSet)
-
Report
public abstract void Report(java.lang.String charset)
-
HandleData
public boolean HandleData(byte[] aBuf, int len)
-
DataEnd
public void DataEnd()
-
Sample
public void Sample(byte[] aBuf, int aLen)
-
Sample
public void Sample(byte[] aBuf, int aLen, boolean aLastChance)
-
getProbableCharsets
public java.lang.String[] getProbableCharsets()
-
-