How would you change a single byte in a file?
<p>What is the best way to change a single byte in a file using Java? I've implemented this in several ways. One uses all byte array manipulation, but this is highly sensitive to the amount of memory available and doesn't scale past 50 MB or so (i.e. I can't allocate 100MB worth of byte[] without getting OutOfMemory errors). I also implemented it another way which works, and scales, but it feels quite hacky.</p>

<p>If you're a java io guru, and you had to contend with very large files (200-500MB), how might you approach this?</p>

<p>Thanks!</p>
