finish
Called before .close, passing in the number of documents that were written. Note that this is intentionally redundant (equivalent to the number of calls to .startDocument, but a Codec should check that this is the case to detect the JRE bug described in LUCENE-1282.