I would create a large file on disk to ensure that you always save the same space and then continue the tests, i.e. reading / writing fragments of the file using the RFA , varying the size of these pieces. I would also change the position of the pieces (randomly or go back to the beginning and end of the file). All this will allow you to measure the average transfer rate for certain situations depending on the size of the piece, etc.
Bear in mind that whether you use java or just C, you do not have access to organize low-level files. You can use an HD fragment (simpler, the more unlikely that it is very fragmented). This information is available only at the kernel level (and not at the user level). However, if you perform many tests (not one reads one part of the file, but many read the entire file space), and the disk is significantly empty (to make sure that the block on the disk does not have much fragmentation), you can statistically get a quite reasonable indicator of read speed / records.
Another important issue that I forgot will affect your measurements - this is cache. The first time you read a fragment from a file that most likely will not use the cache, but not the second time. For this, I recommend that you familiarize yourself with the approaches of this other issue .
source share