title: Edit a file without going over the whole bytes buffer?
body: <p>I want to "override" or "switch" some bytes (say the first 2048 bytes from the file) with another bytes array, in a file which size is 100MB.<br/>
  I don't want to read the whole file, because it takes a critic time for me to go over the whole file.</p>
  
  <p>What I've tried so far:</p>
  
  <pre><code>FileOutputStream out = new FileOutputStream(file);
  
  out.getChannel().write(buffer, position);
  </code></pre>
  
  <p>The new buffer array is in the same size.</p>
  
  <p>I'm developing with java + eclipse Android application which need to to that.<br/>
  I'll be glad if someone could write me a piece of code that do the job.</p>
  
  <p>Thanks in advance.   </p>