title: Replace first line of a text file in Java
body: <p>I have a text file where I want to change only the first line of the file.  The file could be millions of rows long, so I'd rather not have to loop over everything, so I'm wondering if there is another way to do this.</p>
  
  <p>I'd also like to apply some rules to the first line so that I replace instances of certain words with other words.</p>
  
  <p>Is this possible?</p>