public FileIndexBuilder appendNextRecord ( long recordSize ) { checkIfDestroyed ( ) ; if ( recordSize < 0 ) throw new IllegalArgumentException ( "Size cannot be negative." ) ; if ( currentRecord == step ) { index . add ( startingByte + currentByte ) ; currentRecord = 0 ; } currentByte += recordSize ; ++ currentRecord ; return this ; }
Appends next record to this index builder and returns this .