Decoding a file resource for scanning in Android
<p>I'm new to Stack Overflow, but I have a question about writing some Java code for an Android program.</p>

<p>I'm building a game for the Android phone, and when we are building levels we are aiming to scan them from text files that are stored in the res/raw for our project. My problem is that I can't figure out how to decode the resource in such a way that it can be interpreted by the Scanner. Right now my line of code just looks like:</p>

<pre><code>Scanner input = new Scanner(new File((R.raw.level1));
</code></pre>

<p>This is pretty much just a reinterpretation of the equivalent Java code, which would take a string with the level name. I'm guessing that I'm supposed to be using something like decodeResource for BitmapFactory, but I'm not sure where to look! Perhaps I shouldn't be approaching it as a File at all?</p>

<p>Thank you in advance for your help!</p>
