docs: protected int checkRead(int offset, int length) {
      checkOffset(offset);
      int position = offset + length;
      if (position > size()) {
        throw new BufferUnderflowException();
      }
      return position;
    }