public long finish ( ) { final BAMIndexContent content = indexBuilder . processReference ( referenceIndex ) ; outputWriter . writeReference ( content ) ; outputWriter . close ( ) ; return indexBuilder . getNoCoordinateRecordCount ( ) ; }
Finalizes writing and closes the file .