public String line(boolean includeNewLine){
  int start=myPosition;
  while (!isEol()) {
    myPosition++;
  }
  int end;
  if (includeNewLine) {
    nextLine();
    end=myPosition;
  }
 else {
    end=myPosition;
    nextLine();
  }
  return myText.substring(start,end);
}

public String line ( boolean includeNewLine ) { int start = myPosition ; while ( ! isEol ( ) ) { myPosition ++ ; } int end ; if ( includeNewLine ) { nextLine ( ) ; end = myPosition ; } else { end = myPosition ; nextLine ( ) ; } return myText . substring ( start , end ) ; }
get text from the current position until the end of the line . after return , the current position is the start of the next line .
