writeUTF adds null to output
<pre><code>for(int i=0;i&lt;charset.size(); i++ )
       {
       String plaintext1= charset.get(i); 
       fos= new FileOutputStream("/root/something.txt", true);
       dos= new DataOutputStream(fos);
       String hashtext=CreateHash.returnString(charset.get(i));
        dos.writeUTF('\n'+plaintext1+" ="+hashtext);
       fos.close();
       dos.close();
       }  
</code></pre>

<p>When I execute this code (there's more), I get &lt; nul >$  after each line and at the start of the page. I'm opening the text file with nedit. </p>
