Top Description Inners Constructors Methods
com.ibm.icu.text

pack-priv abstract Class CharsetRecog_mbcs

extends CharsetRecognizer
Class Inheritance
Known Direct Subclasses
com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_sjis, com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_big5, com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_euc, com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_gb_18030
Imports
java.util.Arrays

CharsetRecognizer implementation for Asian - double or multi-byte - charsets. Match is determined mostly by the input data adhering to the encoding scheme for the charset, and, optionally, frequency-of-occurrence of characters.

Instances of this class are singletons, one per encoding being recognized. They are created in the main CharsetDetector class and kept in the global list of available encodings to be checked. The specific encoding being recognized is determined by subclass.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
CharsetRecog_mbcs.CharsetRecog_big5

Big5 charset recognizer.

pack-priv abstract static class
CharsetRecog_mbcs.CharsetRecog_euc

EUC charset recognizers.

pack-priv static class
pack-priv static class
CharsetRecog_mbcs.CharsetRecog_sjis

Shift-JIS charset recognizer.

pack-priv static class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract String

Returns:

the charset name.
getName
()

Implements abstract com.ibm.icu.text.CharsetRecognizer.getName.

Get the IANA name of this charset.
pack-priv int

Returns:

Two values packed into one int (Damn java, anyhow)
bits 0-7: the match confidence, ranging from 0-100
bits 8-15: The match reason, an enum-like value.
match
(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
,
int[] commonChars)

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

pack-priv abstract boolean

Returns:

True if a character was returned, false at end of input.
nextChar
(CharsetRecog_mbcs.iteratedChar
The iteratedChar "struct" into which the returned char is placed.
it
,
CharsetDetector
The charset detector, which is needed to get at the input byte data being iterated over.
det
)

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme.

Inherited from com.ibm.icu.text.CharsetRecognizer:
getLanguagematch

Constructor Detail

CharsetRecog_mbcsback to summary
pack-priv CharsetRecog_mbcs()

Method Detail

getNameback to summary
pack-priv abstract String getName()

Implements abstract com.ibm.icu.text.CharsetRecognizer.getName.

Get the IANA name of this charset.

Returns:String

the charset name.

Annotations
@Override
matchback to summary
pack-priv int match(CharsetDetector det, int[] commonChars)

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

Parameters
det:CharsetDetector

The CharsetDetector, which contains the input text to be checked for being in this charset.

Returns:int

Two values packed into one int (Damn java, anyhow)
bits 0-7: the match confidence, ranging from 0-100
bits 8-15: The match reason, an enum-like value.

nextCharback to summary
pack-priv abstract boolean nextChar(CharsetRecog_mbcs.iteratedChar it, CharsetDetector det)

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme. This function is not a method of class iteratedChar only because that would require a lot of extra derived classes, which is awkward.

Parameters
it:CharsetRecog_mbcs.iteratedChar

The iteratedChar "struct" into which the returned char is placed.

det:CharsetDetector

The charset detector, which is needed to get at the input byte data being iterated over.

Returns:boolean

True if a character was returned, false at end of input.

com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_mbcs.CharsetRecog_big5

extends CharsetRecog_mbcs
Class Inheritance

Big5 charset recognizer.

Field Summary

Modifier and TypeField and Description
pack-priv static int[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.
pack-priv CharsetMatch
match(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.
pack-priv boolean
nextChar(CharsetRecog_mbcs.iteratedChar
The iteratedChar "struct" into which the returned char is placed.
it
,
CharsetDetector
The charset detector, which is needed to get at the input byte data being iterated over.
det
)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme.
Inherited from com.ibm.icu.text.CharsetRecog_mbcs:
match

Field Detail

commonCharsback to summary
pack-priv static int[] commonChars

Constructor Detail

CharsetRecog_big5back to summary
pack-priv CharsetRecog_big5()

Method Detail

getLanguageback to summary
public String getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Doc from com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.

Returns:String

the language code, or null if the language cannot be determined.

Annotations
@Override
getNameback to summary
pack-priv String getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.

Returns:String

the charset name.

Annotations
@Override
matchback to summary
pack-priv CharsetMatch match(CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Doc from com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

Parameters
det:CharsetDetector

The CharsetDetector, which contains the input text to be checked for being in this charset.

Returns:CharsetMatch

A CharsetMatch object containing details of match with this charset, or null if there was no match.

Annotations
@Override
nextCharback to summary
pack-priv boolean nextChar(CharsetRecog_mbcs.iteratedChar it, CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme. This function is not a method of class iteratedChar only because that would require a lot of extra derived classes, which is awkward.

Parameters
it:CharsetRecog_mbcs.iteratedChar

The iteratedChar "struct" into which the returned char is placed.

det:CharsetDetector

The charset detector, which is needed to get at the input byte data being iterated over.

Returns:boolean

True if a character was returned, false at end of input.

Annotations
@Override
com.ibm.icu.text back to summary

pack-priv abstract Class CharsetRecog_mbcs.CharsetRecog_euc

extends CharsetRecog_mbcs
Class Inheritance
Known Direct Subclasses
com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_euc.CharsetRecog_euc_jp, com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_euc.CharsetRecog_euc_kr

EUC charset recognizers. One abstract class that provides the common function for getting the next character according to the EUC encoding scheme, and nested derived classes for EUC_KR, EUC_JP, EUC_CN.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
nextChar(CharsetRecog_mbcs.iteratedChar
The iteratedChar "struct" into which the returned char is placed.
it
,
CharsetDetector
The charset detector, which is needed to get at the input byte data being iterated over.
det
)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme.
Inherited from com.ibm.icu.text.CharsetRecog_mbcs:
getNamematch

Constructor Detail

CharsetRecog_eucback to summary
pack-priv CharsetRecog_euc()

Method Detail

nextCharback to summary
pack-priv boolean nextChar(CharsetRecog_mbcs.iteratedChar it, CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme. This function is not a method of class iteratedChar only because that would require a lot of extra derived classes, which is awkward.

Parameters
it:CharsetRecog_mbcs.iteratedChar

The iteratedChar "struct" into which the returned char is placed.

det:CharsetDetector

The charset detector, which is needed to get at the input byte data being iterated over.

Returns:boolean

True if a character was returned, false at end of input.

Annotations
@Override
com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_mbcs.CharsetRecog_euc.CharsetRecog_euc_jp

extends CharsetRecog_euc
Class Inheritance

The charset recognize for EUC-JP. A singleton instance of this class is created and kept by the public CharsetDetector class

Field Summary

Modifier and TypeField and Description
pack-priv static int[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.
pack-priv CharsetMatch
match(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.
Inherited from com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_euc:
nextChar

Field Detail

commonCharsback to summary
pack-priv static int[] commonChars

Constructor Detail

CharsetRecog_euc_jpback to summary
pack-priv CharsetRecog_euc_jp()

Method Detail

getLanguageback to summary
public String getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Doc from com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.

Returns:String

the language code, or null if the language cannot be determined.

Annotations
@Override
getNameback to summary
pack-priv String getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.

Returns:String

the charset name.

Annotations
@Override
matchback to summary
pack-priv CharsetMatch match(CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Doc from com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

Parameters
det:CharsetDetector

The CharsetDetector, which contains the input text to be checked for being in this charset.

Returns:CharsetMatch

A CharsetMatch object containing details of match with this charset, or null if there was no match.

Annotations
@Override
com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_mbcs.CharsetRecog_euc.CharsetRecog_euc_kr

extends CharsetRecog_euc
Class Inheritance

The charset recognize for EUC-KR. A singleton instance of this class is created and kept by the public CharsetDetector class

Field Summary

Modifier and TypeField and Description
pack-priv static int[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.
pack-priv CharsetMatch
match(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.
Inherited from com.ibm.icu.text.CharsetRecog_mbcs.CharsetRecog_euc:
nextChar

Field Detail

commonCharsback to summary
pack-priv static int[] commonChars

Constructor Detail

CharsetRecog_euc_krback to summary
pack-priv CharsetRecog_euc_kr()

Method Detail

getLanguageback to summary
public String getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Doc from com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.

Returns:String

the language code, or null if the language cannot be determined.

Annotations
@Override
getNameback to summary
pack-priv String getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.

Returns:String

the charset name.

Annotations
@Override
matchback to summary
pack-priv CharsetMatch match(CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Doc from com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

Parameters
det:CharsetDetector

The CharsetDetector, which contains the input text to be checked for being in this charset.

Returns:CharsetMatch

A CharsetMatch object containing details of match with this charset, or null if there was no match.

Annotations
@Override
com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_mbcs.CharsetRecog_gb_18030

extends CharsetRecog_mbcs
Class Inheritance

GB-18030 recognizer. Uses simplified Chinese statistics.

Field Summary

Modifier and TypeField and Description
pack-priv static int[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.
pack-priv CharsetMatch
match(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.
pack-priv boolean
nextChar(CharsetRecog_mbcs.iteratedChar
The iteratedChar "struct" into which the returned char is placed.
it
,
CharsetDetector
The charset detector, which is needed to get at the input byte data being iterated over.
det
)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme.
Inherited from com.ibm.icu.text.CharsetRecog_mbcs:
match

Field Detail

commonCharsback to summary
pack-priv static int[] commonChars

Constructor Detail

CharsetRecog_gb_18030back to summary
pack-priv CharsetRecog_gb_18030()

Method Detail

getLanguageback to summary
public String getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Doc from com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.

Returns:String

the language code, or null if the language cannot be determined.

Annotations
@Override
getNameback to summary
pack-priv String getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.

Returns:String

the charset name.

Annotations
@Override
matchback to summary
pack-priv CharsetMatch match(CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Doc from com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

Parameters
det:CharsetDetector

The CharsetDetector, which contains the input text to be checked for being in this charset.

Returns:CharsetMatch

A CharsetMatch object containing details of match with this charset, or null if there was no match.

Annotations
@Override
nextCharback to summary
pack-priv boolean nextChar(CharsetRecog_mbcs.iteratedChar it, CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme. This function is not a method of class iteratedChar only because that would require a lot of extra derived classes, which is awkward.

Parameters
it:CharsetRecog_mbcs.iteratedChar

The iteratedChar "struct" into which the returned char is placed.

det:CharsetDetector

The charset detector, which is needed to get at the input byte data being iterated over.

Returns:boolean

True if a character was returned, false at end of input.

Annotations
@Override
com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_mbcs.CharsetRecog_sjis

extends CharsetRecog_mbcs
Class Inheritance

Shift-JIS charset recognizer.

Field Summary

Modifier and TypeField and Description
pack-priv static int[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.
pack-priv CharsetMatch
match(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.
pack-priv boolean
nextChar(CharsetRecog_mbcs.iteratedChar
The iteratedChar "struct" into which the returned char is placed.
it
,
CharsetDetector
The charset detector, which is needed to get at the input byte data being iterated over.
det
)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme.
Inherited from com.ibm.icu.text.CharsetRecog_mbcs:
match

Field Detail

commonCharsback to summary
pack-priv static int[] commonChars

Constructor Detail

CharsetRecog_sjisback to summary
pack-priv CharsetRecog_sjis()

Method Detail

getLanguageback to summary
public String getLanguage()

Overrides com.ibm.icu.text.CharsetRecognizer.getLanguage.

Doc from com.ibm.icu.text.CharsetRecognizer.getLanguage.

Get the ISO language code for this charset.

Returns:String

the language code, or null if the language cannot be determined.

Annotations
@Override
getNameback to summary
pack-priv String getName()

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.getName.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.getName.

Get the IANA name of this charset.

Returns:String

the charset name.

Annotations
@Override
matchback to summary
pack-priv CharsetMatch match(CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecognizer.match.

Doc from com.ibm.icu.text.CharsetRecognizer.match.

Test the match of this charset with the input text data which is obtained via the CharsetDetector object.

Parameters
det:CharsetDetector

The CharsetDetector, which contains the input text to be checked for being in this charset.

Returns:CharsetMatch

A CharsetMatch object containing details of match with this charset, or null if there was no match.

Annotations
@Override
nextCharback to summary
pack-priv boolean nextChar(CharsetRecog_mbcs.iteratedChar it, CharsetDetector det)

Implements abstract com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Doc from com.ibm.icu.text.CharsetRecog_mbcs.nextChar.

Get the next character (however many bytes it is) from the input data Subclasses for specific charset encodings must implement this function to get characters according to the rules of their encoding scheme. This function is not a method of class iteratedChar only because that would require a lot of extra derived classes, which is awkward.

Parameters
it:CharsetRecog_mbcs.iteratedChar

The iteratedChar "struct" into which the returned char is placed.

det:CharsetDetector

The charset detector, which is needed to get at the input byte data being iterated over.

Returns:boolean

True if a character was returned, false at end of input.

Annotations
@Override
com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_mbcs.iteratedChar

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv boolean
pack-priv boolean
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

charValueback to summary
pack-priv int charValue
doneback to summary
pack-priv boolean done
errorback to summary
pack-priv boolean error
nextIndexback to summary
pack-priv int nextIndex

Constructor Detail

iteratedCharback to summary
pack-priv iteratedChar()

Method Detail

nextByteback to summary
pack-priv int nextByte(CharsetDetector det)
resetback to summary
pack-priv void reset()