code: protected String getTail(int maximum) {
  
      String tail = "";
      if (this.offset < this.limit) {
        int count = this.limit - this.offset + 1;
        if (count > maximum) {
          count = maximum;
        }
        tail = new String(this.buffer, this.offset, count);
      }
      return tail;
    }
docs: This method gets the tail of this scanner limited (truncated) to the given {@code maximum} number of
  characters without changing the state.
  
  @param maximum is the maximum number of characters to return from the {@link #getTail() tail}.
  @return the tail of this scanner.