public void finishAnnotating(){
  endAnnotation();
  if (annotations != null) {
    int asz=annotations.size();
    while (asz > 0) {
      Annotation last=annotations.get(asz - 1);
      if (last.getStart() > cursor) {
        annotations.remove(asz - 1);
        asz--;
      }
 else       if (last.getEnd() > cursor) {
        last.setEnd(cursor);
        break;
      }
 else {
        break;
      }
    }
  }
}

public void finishAnnotating ( ) { endAnnotation ( ) ; if ( annotations != null ) { int asz = annotations . size ( ) ; while ( asz > 0 ) { Annotation last = annotations . get ( asz - 1 ) ; if ( last . getStart ( ) > cursor ) { annotations . remove ( asz - 1 ) ; asz -- ; } else if ( last . getEnd ( ) > cursor ) { last . setEnd ( cursor ) ; break ; } else { break ; } } } }
finishes up annotation processing . this closes off any open annotations and removes annotations that don ' t refer to written data .
