How to have 2 dataInputstream on 1 random access file in java
<p>I have </p>

<pre><code>    DataInputStream dis = new DataInputStream(new BufferedInputStream(new MyFileInputStream(raf.getFD())));
</code></pre>

<p>and </p>

<pre><code>    DataInputStream dis2 = new DataInputStream(new BufferedInputStream(new MyFileInputStream(raf.getFD())));
</code></pre>

<p>where raf is a random access file. I want to read from two different spots in the same input stream at the same time without using reset()/mark(int). Because I dont know how to use it properly without giving me an error.</p>

<p>Anyway if I use 2 dis, I get an EOF exception as soon as I try to read from the second.</p>

<p>Any thoughts?</p>
