public FormattedCharacterBuffer getLine(int lineIndex) {
    FormattedCharacterBuffer result =
        new FormattedCharacterBuffer(1 /* one line only */, numberOfColumnsInBuffer);
    for (int column = 0; column < getNumberOfColumns(); column++) {
      int readIndex = (lineIndex * getNumberOfColumns()) + column;
      char value = charBuffer[readIndex];
      Font font = perCharFonts[readIndex];
      Color foreground = perCharForegroundColor[readIndex];
      Color background = perCharBackgroundColor[readIndex];

      result.setAt(0, column, value, font, foreground, background);
    }
    return result;
  }
Returns a particular line in the current FormattedCharacterBuffer.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/CodeDisplay/FormattedCharacterBuffer.java