private static @NotNull LineSet createLineSet(@NotNull CharSequence text, boolean markModified) {
    IntList starts = new IntArrayList();
    ByteList flags = new ByteArrayList();

    LineTokenizer lineTokenizer = new LineTokenizer(text);
    while (!lineTokenizer.atEnd()) {
      starts.add(lineTokenizer.getOffset());
      flags.add((byte) (lineTokenizer.getLineSeparatorLength() | (markModified ? MODIFIED_MASK : 0)));
      lineTokenizer.advance();
    }
    return new LineSet(starts.toIntArray(), flags.toByteArray(), text.length());
  }
private static @NotNull LineSet createLineSet(@NotNull CharSequence text, boolean markModified)