org.apache.daffodil.processors.charset
Decode multiple characters into a CharBuffer, keeping track of the bit positions after each Char decode
Decode multiple characters into a CharBuffer, keeping track of the bit positions after each Char decode
Decodes at most chars.remaining() characters in the chars CharBuffer. If bitPositions is provided, for each decoded character the bitPosition0b where the character decode operation finished is stored in the bitPositions LongBuffer. Upon return of the decode operation, the bitPosition0b of the InputSourceDataInputStream will be the end of the last successful character decode operation. Returns the number of successfully decode characters.
Decode a single character
Decode a single character
This should read data via the InputSourceDataInputStream in whatever manner is most efficient, as long as at the end of the decode the bitPosition0b is set to to end of the character.
If there was a decode error, the bit position should be set to the end of malformed bits and a BitsCharsetDecoderMalformedException should be thrown specifying how many bits were malformed.
Some encodings need state, but only for the storing of a low surrogate pair. This encapsulates that logic. When a class extends this class, it ust implement deocodeOneUnicodeChar, which should decode one char, and if there is a high/low surrogate pair it should call setLowSurrgoate on the low and return the high.