Package com.ibm.icu.charset
Class CharsetUTF8
- java.lang.Object
-
- java.nio.charset.Charset
-
- com.ibm.icu.charset.CharsetICU
-
- com.ibm.icu.charset.CharsetUTF8
-
- All Implemented Interfaces:
java.lang.Comparable<java.nio.charset.Charset>
- Direct Known Subclasses:
CharsetCESU8
class CharsetUTF8 extends CharsetICU
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
CharsetUTF8.CharsetDecoderUTF8
(package private) class
CharsetUTF8.CharsetEncoderUTF8
-
Field Summary
Fields Modifier and Type Field Description private static int[]
BITMASK_FROM_UTF8
private static byte[]
fromUSubstitution
private boolean
isCESU8
-
Fields inherited from class com.ibm.icu.charset.CharsetICU
codepage, conversionType, hasFromUnicodeFallback, hasToUnicodeFallback, icuCanonicalName, maxBytesPerChar, maxCharsPerByte, minBytesPerChar, name, options, platform, ROUNDTRIP_AND_FALLBACK_SET, ROUNDTRIP_SET, subChar, subChar1, subCharLen, unicodeMask
-
-
Constructor Summary
Constructors Constructor Description CharsetUTF8(java.lang.String icuCanonicalName, java.lang.String javaCanonicalName, java.lang.String[] aliases)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static byte
encodeHeadOf1(int char32)
private static byte
encodeHeadOf2(int char32)
private static byte
encodeHeadOf3(int char32)
private static byte
encodeHeadOf4(int char32)
private static byte
encodeLastTail(int char32)
private static byte
encodeSecondToLastTail(int char32)
private static byte
encodeThirdToLastTail(int char32)
(package private) void
getUnicodeSetImpl(UnicodeSet setFillIn, int which)
This follows ucnv.c method ucnv_detectUnicodeSignature() to detect the start of the stream for example U+FEFF (the Unicode BOM/signature character) that can be ignored.java.nio.charset.CharsetDecoder
newDecoder()
java.nio.charset.CharsetEncoder
newEncoder()
-
Methods inherited from class com.ibm.icu.charset.CharsetICU
contains, forNameICU, getCharset, getCompleteUnicodeSet, getNonSurrogateUnicodeSet, getUnicodeSet, isFixedWidth, isSurrogate
-
-
-
-
Method Detail
-
encodeHeadOf1
private static final byte encodeHeadOf1(int char32)
-
encodeHeadOf2
private static final byte encodeHeadOf2(int char32)
-
encodeHeadOf3
private static final byte encodeHeadOf3(int char32)
-
encodeHeadOf4
private static final byte encodeHeadOf4(int char32)
-
encodeThirdToLastTail
private static final byte encodeThirdToLastTail(int char32)
-
encodeSecondToLastTail
private static final byte encodeSecondToLastTail(int char32)
-
encodeLastTail
private static final byte encodeLastTail(int char32)
-
newDecoder
public java.nio.charset.CharsetDecoder newDecoder()
- Specified by:
newDecoder
in classjava.nio.charset.Charset
-
newEncoder
public java.nio.charset.CharsetEncoder newEncoder()
- Specified by:
newEncoder
in classjava.nio.charset.Charset
-
getUnicodeSetImpl
void getUnicodeSetImpl(UnicodeSet setFillIn, int which)
Description copied from class:CharsetICU
This follows ucnv.c method ucnv_detectUnicodeSignature() to detect the start of the stream for example U+FEFF (the Unicode BOM/signature character) that can be ignored. Detects Unicode signature byte sequences at the start of the byte stream and returns number of bytes of the BOM of the indicated Unicode charset. 0 is returned when no Unicode signature is recognized.- Specified by:
getUnicodeSetImpl
in classCharsetICU
-
-