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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean(package private) int(package private) byte[](package private) int(package private) int(package private) CoderResult(package private) intprivate static final intprivate static final intprivate static final intprivate booleanprivate int(package private) int(package private) intprivate static final int(package private) intFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprivate intafterGetTrail(ByteBuffer source, CharBuffer target, IntBuffer offsets) private intdecodeBocu1LeadByte(int b) Function for BOCU-1 decoder; handles multi-byte lead bytes.private intdecodeBocu1TrailByte(int countValue, int b) Function for BOCU-1 decoder; handles multi-byte trail bytes.protected CoderResultdecodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) private voidendLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets) private intfastSingle(ByteBuffer source, CharBuffer target, IntBuffer offsets) private intgetTrail(ByteBuffer source, CharBuffer target, IntBuffer offsets) Methods inherited from class com.ibm.icu.charset.CharsetDecoderICU
decode, decodeLoop, implFlush, implOnMalformedInput, implOnUnmappableCharacter, implReset, isFallbackUsed, isToUUseFallback, isToUUseFallback, maxBytesPerChar, setToUCallback, toUCountPending, toUnicodeWithCallback, toUWriteUCharsMethods 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 Details
-
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
CoderResult cr -
fastSingle
private static final int fastSingle- See Also:
-
getTrail
private static final int getTrail- See Also:
-
regularLoop
private static final int regularLoop- See Also:
-
endLoop
private static final int endLoop- See Also:
-
LabelLoop
private boolean LabelLoop -
afterTrail
private boolean afterTrail -
labelType
private int labelType
-
-
Constructor Details
-
CharsetDecoderBOCU
-
-
Method Details
-
decodeBocu1LeadByte
private int decodeBocu1LeadByte(int b) Function for BOCU-1 decoder; handles multi-byte lead bytes.- Parameters:
b- lead byte; BOCU1_MINinvalid input: '<'=binvalid input: '<'BOCU1_START_NEG_2 or BOCU1_START_POS_2invalid input: '<'=binvalid input: '<'BOCU1_MAX_LEAD- Returns:
- (diffinvalid input: '<'invalid input: '<'2)|count
-
decodeBocu1TrailByte
private int decodeBocu1TrailByte(int countValue, int b) Function for BOCU-1 decoder; handles multi-byte trail bytes.- Parameters:
b- trail bytecount- number of remaining trail bytes including this one- Returns:
- new delta for diff including b - invalid input: '<'0 indicates an error
- See Also:
-
decodeLoop
protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) - Specified by:
decodeLoopin classCharsetDecoderICU
-
fastSingle
-
getTrail
-
afterGetTrail
-
endLoop
-