Package com.ibm.icu.charset
Class CharsetBOCU1.CharsetDecoderBOCU
- java.lang.Object
-
- java.nio.charset.CharsetDecoder
-
- com.ibm.icu.charset.CharsetDecoderICU
-
- com.ibm.icu.charset.CharsetBOCU1.CharsetDecoderBOCU
-
- Enclosing class:
- CharsetBOCU1
static class CharsetBOCU1.CharsetDecoderBOCU extends CharsetDecoderICU
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
afterTrail
(package private) int
byteIndex
(package private) byte[]
bytes
(package private) int
c
(package private) int
count
(package private) java.nio.charset.CoderResult
cr
(package private) int
diff
private static int
endLoop
private static int
fastSingle
private static int
getTrail
private boolean
LabelLoop
private int
labelType
(package private) int
nextSourceIndex
(package private) int
prev
private static int
regularLoop
(package private) int
sourceIndex
-
Fields inherited from class com.ibm.icu.charset.CharsetDecoderICU
charErrorBufferArray, charErrorBufferBegin, charErrorBufferLength, EXT_MAX_BYTES, invalidCharBuffer, invalidCharLength, mode, preToUArray, preToUBegin, preToUFirstLength, preToULength, toCharErrorBehaviour, toUBytesArray, toUBytesBegin, toUContext, toULength, toUnicodeStatus
-
-
Constructor Summary
Constructors Constructor Description CharsetDecoderBOCU(CharsetICU cs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
afterGetTrail(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
private int
decodeBocu1LeadByte(int b)
Function for BOCU-1 decoder; handles multi-byte lead bytes.private int
decodeBocu1TrailByte(int countValue, int b)
Function for BOCU-1 decoder; handles multi-byte trail bytes.protected java.nio.charset.CoderResult
decodeLoop(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets, boolean flush)
private void
endLoop(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
private int
fastSingle(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
private int
getTrail(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
-
Methods inherited from class com.ibm.icu.charset.CharsetDecoderICU
decode, decodeLoop, implFlush, implOnMalformedInput, implOnUnmappableCharacter, implReset, isFallbackUsed, isToUUseFallback, isToUUseFallback, maxBytesPerChar, setToUCallback, toUCountPending, toUnicodeWithCallback, toUWriteUChars
-
Methods inherited from class java.nio.charset.CharsetDecoder
averageCharsPerByte, charset, decode, decode, detectedCharset, flush, implReplaceWith, isAutoDetecting, isCharsetDetected, malformedInputAction, maxCharsPerByte, onMalformedInput, onUnmappableCharacter, replacement, replaceWith, reset, unmappableCharacterAction
-
-
-
-
Field Detail
-
byteIndex
int byteIndex
-
sourceIndex
int sourceIndex
-
nextSourceIndex
int nextSourceIndex
-
prev
int prev
-
c
int c
-
diff
int diff
-
count
int count
-
bytes
byte[] bytes
-
cr
java.nio.charset.CoderResult cr
-
fastSingle
private static final int fastSingle
- See Also:
- Constant Field Values
-
getTrail
private static final int getTrail
- See Also:
- Constant Field Values
-
regularLoop
private static final int regularLoop
- See Also:
- Constant Field Values
-
endLoop
private static final int endLoop
- See Also:
- Constant Field Values
-
LabelLoop
private boolean LabelLoop
-
afterTrail
private boolean afterTrail
-
labelType
private int labelType
-
-
Constructor Detail
-
CharsetDecoderBOCU
public CharsetDecoderBOCU(CharsetICU cs)
-
-
Method Detail
-
decodeBocu1LeadByte
private int decodeBocu1LeadByte(int b)
Function for BOCU-1 decoder; handles multi-byte lead bytes.- Parameters:
b
- lead byte; BOCU1_MIN<=b- Returns:
- (diff<<2)|count
-
decodeBocu1TrailByte
private int decodeBocu1TrailByte(int countValue, int b)
Function for BOCU-1 decoder; handles multi-byte trail bytes.- Parameters:
count
- number of remaining trail bytes including this oneb
- trail byte- Returns:
- new delta for diff including b - <0 indicates an error
- See Also:
decodeBocu1
-
decodeLoop
protected java.nio.charset.CoderResult decodeLoop(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets, boolean flush)
- Specified by:
decodeLoop
in classCharsetDecoderICU
-
fastSingle
private int fastSingle(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
-
getTrail
private int getTrail(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
-
afterGetTrail
private int afterGetTrail(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
-
endLoop
private void endLoop(java.nio.ByteBuffer source, java.nio.CharBuffer target, java.nio.IntBuffer offsets)
-
-