code: private void incrementIndexes(int c) {
          if(c > 0) {
              this.index++;
              if(c=='\r') {
                  this.line++;
                  this.characterPreviousLine = this.character;
                  this.character=0;
              }else if (c=='\n') {
                  if(this.previous != '\r') {
                      this.line++;
                      this.characterPreviousLine = this.character;
                  }
                  this.character=0;
              } else {
                  this.character++;
              }
          }
      }
docs: Increments the internal indexes according to the previous character
  read and the character passed as the current character.
  @param c the current character read.