public static long getFileLengthFromBlockSize ( long blockSize , int bytesPerChecksum , int checksumSize ) { long numChunks ; if ( blockSize % bytesPerChecksum == 0 ) { numChunks = blockSize / bytesPerChecksum ; } else { numChunks = blockSize / bytesPerChecksum + 1 ; } return blockSize + numChunks * checksumSize + BlockInlineChecksumReader . getHeaderSize ( ) ; }
get file length for the block size .