Package com.ibm.icu.text
Class CharsetRecog_Unicode
- java.lang.Object
-
- com.ibm.icu.text.CharsetRecognizer
-
- com.ibm.icu.text.CharsetRecog_Unicode
-
- Direct Known Subclasses:
CharsetRecog_Unicode.CharsetRecog_UTF_16_BE
,CharsetRecog_Unicode.CharsetRecog_UTF_16_LE
,CharsetRecog_Unicode.CharsetRecog_UTF_32
abstract class CharsetRecog_Unicode extends CharsetRecognizer
This class matches UTF-16 and UTF-32, both big- and little-endian. The BOM will be used if it is present.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CharsetRecog_Unicode.CharsetRecog_UTF_16_BE
(package private) static class
CharsetRecog_Unicode.CharsetRecog_UTF_16_LE
(package private) static class
CharsetRecog_Unicode.CharsetRecog_UTF_32
(package private) static class
CharsetRecog_Unicode.CharsetRecog_UTF_32_BE
(package private) static class
CharsetRecog_Unicode.CharsetRecog_UTF_32_LE
-
Constructor Summary
Constructors Constructor Description CharsetRecog_Unicode()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static int
adjustConfidence(int codeUnit, int confidence)
(package private) static int
codeUnit16FromBytes(byte hi, byte lo)
(package private) abstract java.lang.String
getName()
Get the IANA name of this charset.(package private) abstract CharsetMatch
match(CharsetDetector det)
Test the match of this charset with the input text data which is obtained via the CharsetDetector object.-
Methods inherited from class com.ibm.icu.text.CharsetRecognizer
getLanguage
-
-
-
-
Method Detail
-
getName
abstract java.lang.String getName()
Description copied from class:CharsetRecognizer
Get the IANA name of this charset.- Specified by:
getName
in classCharsetRecognizer
- Returns:
- the charset name.
-
match
abstract CharsetMatch match(CharsetDetector det)
Description copied from class:CharsetRecognizer
Test the match of this charset with the input text data which is obtained via the CharsetDetector object.- Specified by:
match
in classCharsetRecognizer
- Parameters:
det
- The CharsetDetector, which contains the input text to be checked for being in this charset.- Returns:
- A CharsetMatch object containing details of match with this charset, or null if there was no match.
-
codeUnit16FromBytes
static int codeUnit16FromBytes(byte hi, byte lo)
-
adjustConfidence
static int adjustConfidence(int codeUnit, int confidence)
-
-