Top Description Constructors Methods
com.ibm.icu.text

pack-priv abstract Class CharsetRecognizer

extends Object
Class Inheritance
Known Direct Subclasses
com.ibm.icu.text.CharsetRecog_2022, com.ibm.icu.text.CharsetRecog_mbcs, com.ibm.icu.text.CharsetRecog_sbcs, com.ibm.icu.text.CharsetRecog_Unicode, com.ibm.icu.text.CharsetRecog_UTF8

Abstract class for recognizing a single charset. Part of the implementation of ICU's CharsetDetector. Each specific charset that can be recognized will have an instance of some subclass of this class. All interaction between the overall CharsetDetector and the stuff specific to an individual charset happens via the interface provided here. Instances of CharsetDetector DO NOT have or maintain state pertaining to a specific match or detect operation. The WILL be shared by multiple instances of CharsetDetector. They encapsulate const charset-specific information.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the language code, or null if the language cannot be determined.
getLanguage
()

Get the ISO language code for this charset.

pack-priv abstract String

Returns:

the charset name.
getName
()

Get the IANA name of this charset.

pack-priv abstract CharsetMatch

Returns:

A CharsetMatch object containing details of match with this charset, or null if there was no match.
match
(CharsetDetector
The CharsetDetector, which contains the input text to be checked for being in this charset.
det
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CharsetRecognizerback to summary
pack-priv CharsetRecognizer()

Method Detail

getLanguageback to summary
public String getLanguage()

Get the ISO language code for this charset.

Returns:String

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

getNameback to summary
pack-priv abstract String getName()

Get the IANA name of this charset.

Returns:String

the charset name.

matchback to summary
pack-priv abstract CharsetMatch match(CharsetDetector det)

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.