title: Concurrency of RandomAccessFile in Java
body: <p>I am creating a <code>RandomAccessFile</code> object to write to a file (on SSD) by multiple threads. Each thread tries to write a direct byte buffer at a specific position within the file and I ensure that the position at which a thread writes won't overlap with another thread:</p>
  
  <pre><code>file_.getChannel().write(buffer, position);
  </code></pre>
  
  <p>where <code>file_</code> is an instance of <code>RandomAccessFile</code> and <code>buffer</code> is a direct byte buffer.</p>
  
  <p>For the RandomAccessFile object, since I'm not using fallocate to allocate the file, and the file's length is changing, will this utilize the concurrency of the underlying media? </p>
  
  <p>If it is not, is there any point in using the above function without calling fallocate while creating the file?</p>