code: public int newBufferStartsAt(int iTargetPosition, GridList gridList)
      {
  //**NOTE** This can be improved by moving any overlapping records in the old buffer to the new buffer
      // Discard the entire current buffer
          if (gridList != null)
              this.moveBufferToAccessList(gridList);
          for (int index = m_iCurrentRecordStart; index < m_iCurrentRecordEnd; index++)
          {
              int iArrayIndex = this.bufferToArrayIndex(index);
              Object bookmark = m_aCurrentRecord[iArrayIndex];
              m_aCurrentRecord[iArrayIndex] = gEmptyCell;
              if (!gridList.inRecordList(index))
                  if ((bookmark != null) && (bookmark != gEmptyCell))
                      this.freeElement(bookmark);
          }
          m_iCurrentRecordStart = iTargetPosition;
          m_iCurrentRecordEnd = iTargetPosition;  // No records in buffer!
          return this.bufferToArrayIndex(iTargetPosition);
      }
docs: Shift the current cache to the current records and setup a new buffer.
  @param iTargetPosition The new target position.
  @param gridList The gridList to update with buffer items before I free them.
  @return The new physical position of this target position.