code: public void eat() {
          int i;
  
          if (endPageIdx == 0) {
              position.update(endPage, start, end);
              start = end;
          } else {
              position.update(pages.get(0), start, pageSize);
              for (i = 1; i < endPageIdx; i++) {
                  position.update(pages.get(i), 0, pageSize);
              }
              pages.shrink(endPageIdx);
              endPageIdx = 0;
              endPage = pages.get(0);
              start = end;
              position.update(endPage, 0, start);
          }
      }
docs: Move start forward to the current position.