title: Can multiple Java processes read the same file at the same time?
body: <p>Is it possible to read the same file from two or more different processes at the same time?</p>
  
  <p>I'd like to do something like this in a Java application:</p>
  
  <pre><code>final File f = new File("read-only-file");
  final FileInputStream in = new FileInputStream(f);
  int b;
  while((b = in.read()) != null) {
      //process b
      Thread.sleep(10); //several read processes would really happen at the same time
  }
  </code></pre>
  
  <p>No application would ever write to the file but several threads/applications need to execute the code above at the same time. Is the code above fine or do I need to use any special mechanisms in that case?</p>
  
  <p>Also the solution should be platform-independent and must work on Linux like systems.</p>