title: java get file size efficiently
body: <p>While googling, I see that using <a href="http://docs.oracle.com/javase/6/docs/api/java/io/File.html#length%28%29" rel="noreferrer"><code>java.io.File#length()</code></a> can be slow.
  <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html" rel="noreferrer"><code>FileChannel</code></a> has a <a href="http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html#size%28%29" rel="noreferrer"><code>size()</code></a> method that is available as well.</p>
  
  <p>Is there an efficient way in java to get the file size?</p>