Reading a file then performing an action in Java
<p>I need to code something that reads a certain file for the line "voted: " then checks the number after it. It then needs to take this number, add one to it, and print it back into the file. Here is what I have so far:</p>

<pre><code> try{
       File yourFile = new File(p + ".vote");
           if(!yourFile.exists()) {
               yourFile.createNewFile();
           } 
       FileOutputStream oFile = new FileOutputStream(yourFile, false); 
       this.logger.info("A vote file for the user " + p + " has been created!");
 } catch(Exception e) {
     this.logger.warning("Failed to create a vote file for the user " + p + "!");
</code></pre>

<p>So, how would I do this?  </p>
