title: Java remove unwanted spaces in a text file and replace with character
body: <p>I have the following text file. I want to remove the lines and spaces so that the text file has a clear delimter to process. I cannot think of any way to remove the gaps between lines, is there a way?</p>
  
  <pre><code>Student+James Smith+Status: Current Student+Student+James Fits+Status: Not a current Student
  </code></pre>
  
  <p>Textfile</p>
  
  <pre><code>Student
       James Smith
  
  Status: Current Student
  
  Student
       James Fits
  
  Status: Not a current Student
  </code></pre>