Class CharsetBOCU1.CharsetDecoderBOCU

Enclosing class:
CharsetBOCU1

static class CharsetBOCU1.CharsetDecoderBOCU extends CharsetDecoderICU
  • 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

    • 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

      public CharsetDecoderBOCU(CharsetICU cs)
  • Method Details

    • decodeBocu1LeadByte

      private int decodeBocu1LeadByte(int b)
      Function for BOCU-1 decoder; handles multi-byte lead bytes.
      Parameters:
      b - lead byte; BOCU1_MIN<=b<BOCU1_START_NEG_2 or BOCU1_START_POS_2<=b<BOCU1_MAX_LEAD
      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 one
      b - trail byte
      Returns:
      new delta for diff including b - <0 indicates an error
      See Also:
      • decodeBocu1
    • decodeLoop

      protected CoderResult decodeLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush)
      Specified by:
      decodeLoop in class CharsetDecoderICU
    • fastSingle

      private int fastSingle(ByteBuffer source, CharBuffer target, IntBuffer offsets)
    • getTrail

      private int getTrail(ByteBuffer source, CharBuffer target, IntBuffer offsets)
    • afterGetTrail

      private int afterGetTrail(ByteBuffer source, CharBuffer target, IntBuffer offsets)
    • endLoop

      private void endLoop(ByteBuffer source, CharBuffer target, IntBuffer offsets)