code: public void clear(int i) {
          char ch = (char) -1;
          int apos = i - 1;
          int rpos = pos - 1;
          for (; rpos > -1 && apos > -1; rpos--, apos--) {
              buffer[rpos] = ch;
              buffer2[rpos] = -1;
          }
          for (rpos = buffer.length - 1; apos > -1; rpos--, apos--) {
              buffer[rpos] = ch;
              buffer2[rpos] = -1;
          }
      }
docs: Clear scan buffer at position.
  @param i the position