|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Internal public interface CharIndexTranslator
Method Summary | |
---|---|
int |
getByteIndex(int charPos)
Calculates the byte index of the given char index. |
int |
getCharIndex(int bytePos)
Deprecated. This API were based on incorrect assumption that single byte offset corresponds to single char offset |
int |
getCharIndex(int bytePos,
int startCP)
Deprecated. This API were based on incorrect assumption that single byte offset corresponds to single char offset |
int[][] |
getCharIndexRanges(int startBytePosInclusive,
int endBytePosExclusive)
Finds character ranges that includes specified byte range. |
boolean |
isIndexInTable(int bytePos)
Check if index is in table |
int |
lookIndexBackward(int bytePos)
Return last index <= bytePos that is in table |
int |
lookIndexForward(int bytePos)
Return first index >= bytePos that is in table |
Method Detail |
---|
int getByteIndex(int charPos)
charPos
- The char position
@Deprecated int getCharIndex(int bytePos)
bytePos
- The character offset to check
@Deprecated int getCharIndex(int bytePos, int startCP)
bytePos
- The character offset to checkstartCP
- look from this characted position
int[][] getCharIndexRanges(int startBytePosInclusive, int endBytePosExclusive)
startBytePosInclusive
- start byte rangeendBytePosExclusive
- end byte rangeboolean isIndexInTable(int bytePos)
bytePos
-
int lookIndexForward(int bytePos)
bytePos
-
int lookIndexBackward(int bytePos)
bytePos
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |