PHP and a file written by Java FileOutputStream
<p>I have a text file that is written by Java FileOutputStream.</p>

<p>When i read that file using <code>file_get_contents</code>, then everything is on same line and there are no separators between different strings.
I need to know, how to read/parse that file so i have some kind on separators between strings</p>

<p>I'm using somethig like this, to save the file:</p>

<pre><code>Stream stream = new Stream(30000, 30000);
stream.outOffset = 0;
stream.writeString("first string");
stream.writeString("second string");

FileOutputStream out = new FileOutputStream("file.txt");
out.write(stream.outBuffer, 0, stream.outOffset);
out.flush();
out.close();
out = null;
</code></pre>
