Read a C file in java : <p>I've looked for this issue on stack overflow but can't seem to find it. </p>

<p>How do I read a c file in my java program. I just want extracts all comments from an existing C file. </p>

<p>One method is to convert the c File into a txt file and use the following:</p>

<pre><code>RandomAccessFile file = new RandomAccessFile ("example.txt", "rw");
</code></pre>

<p>However that ins't a scalable solution.</p>

<p>Thanks in advance.</p>
