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

pack-priv abstract Class CharsetRecog_2022

extends CharsetRecognizer
Class Inheritance
Known Direct Subclasses
com.ibm.icu.text.CharsetRecog_2022.CharsetRecog_2022JP, com.ibm.icu.text.CharsetRecog_2022.CharsetRecog_2022KR, com.ibm.icu.text.CharsetRecog_2022.CharsetRecog_2022CN

class CharsetRecog_2022 part of the ICU charset detection implementation. This is a superclass for the individual detectors for each of the detectable members of the ISO 2022 family of encodings. The separate classes are nested within this class.

Nested and Inner Type Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int

Returns:

match quality, in the range of 0-100.
match
(byte[]
the byte buffer containing text to analyse
text
,
int
the size of the text in the byte.
textLen
,
byte[][]
the byte escape sequences to test for.
escapeSequences
)

Matching function shared among the 2022 detectors JP, CN and KR Counts up the number of legal an unrecognized escape sequences in the sample of text, and computes a score based on the total number & the proportion that fit the encoding.

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

Constructor Detail

CharsetRecog_2022back to summary
pack-priv CharsetRecog_2022()

Method Detail

matchback to summary
pack-priv int match(byte[] text, int textLen, byte[][] escapeSequences)

Matching function shared among the 2022 detectors JP, CN and KR Counts up the number of legal an unrecognized escape sequences in the sample of text, and computes a score based on the total number & the proportion that fit the encoding.

Parameters
text:byte[]

the byte buffer containing text to analyse

textLen:int

the size of the text in the byte.

escapeSequences:byte[][]

the byte escape sequences to test for.

Returns:int

match quality, in the range of 0-100.

com.ibm.icu.text back to summary

pack-priv Class CharsetRecog_2022.CharsetRecog_2022CN

extends CharsetRecog_2022
Class Inheritance

Field Summary

Modifier and TypeField and Description
private byte[][]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecognizer.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_2022:
match

Field Detail

escapeSequencesback to summary
private byte[][] escapeSequences

Constructor Detail

CharsetRecog_2022CNback to summary
pack-priv CharsetRecog_2022CN()

Method Detail

getNameback to summary
pack-priv String getName()

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

Doc from 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 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_2022.CharsetRecog_2022JP

extends CharsetRecog_2022
Class Inheritance

Field Summary

Modifier and TypeField and Description
private byte[][]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecognizer.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_2022:
match

Field Detail

escapeSequencesback to summary
private byte[][] escapeSequences

Constructor Detail

CharsetRecog_2022JPback to summary
pack-priv CharsetRecog_2022JP()

Method Detail

getNameback to summary
pack-priv String getName()

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

Doc from 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 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_2022.CharsetRecog_2022KR

extends CharsetRecog_2022
Class Inheritance

Field Summary

Modifier and TypeField and Description
private byte[][]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv String
getName()

Implements abstract com.ibm.icu.text.CharsetRecognizer.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_2022:
match

Field Detail

escapeSequencesback to summary
private byte[][] escapeSequences

Constructor Detail

CharsetRecog_2022KRback to summary
pack-priv CharsetRecog_2022KR()

Method Detail

getNameback to summary
pack-priv String getName()

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

Doc from 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 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