Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hwpf.model
Interface CharIndexTranslator

All Known Implementing Classes:
  TextPieceTable

    public interface CharIndexTranslator

Method Summary
`int` | `getCharIndex(int bytePos)` Calculates the char index of the given byte index.
`int` | `getCharIndex(int bytePos, int startCP)` Calculates the char index of the given byte index.
`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

### getCharIndex

    int getCharIndex(int bytePos)

  Calculates the char index of the given byte index. Look forward if index is not in table

  Parameters:
    `bytePos` - The character offset to check
  Returns:
    the char index

### getCharIndex

    int getCharIndex(int bytePos,
                     int startCP)

  Calculates the char index of the given byte index. Look forward if index is not in table

  Parameters:
    `bytePos` - The character offset to check
    `startCP` - look from this characted position
  Returns:
    the char index

### isIndexInTable

    boolean isIndexInTable(int bytePos)

  Check if index is in table

  Parameters:
    `bytePos` -
  Returns:
    true if index in table, false if not

### lookIndexForward

    int lookIndexForward(int bytePos)

  Return first index >= bytePos that is in table

  Parameters:
    `bytePos` -
  Returns:
    first index greater or equal to bytePos that is in table

### lookIndexBackward

    int lookIndexBackward(int bytePos)

  Return last index <= bytePos that is in table

  Parameters:
    `bytePos` -
  Returns:
    last index less of equal to bytePos that is in table

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2010 The Apache Software Foundation or its licensors, as applicable.