code: void update(long index, int b)
      {
          if (size > 0)
          {
              assert index <= hi;
              if (index < lo)
              {
                  throw new IllegalStateException("lookaheadLength() too small in ChecksumProvider implementation");
              }
              hi = index;
              if ((lo == hi - size))
              {
                  checksum.update(lookahead[(int)(lo % size)]);
                  lo++;
              }
              lookahead[(int)(hi++ % size)] = b;
          }
          else
          {
              if (index == hi)
              {
                  checksum.update(b);
                  hi = index+1;
              }
              else
              {
                  if (index != hi -1)
                  {
                      throw new IllegalStateException("lookahead needed for checksum");
                  }
              }
          }
      }
docs: Update with character index.
  @param index
  @param b