Writing and reading to and from a file for integers and strings
<p>I am trying to save a file (and then read it later) in java  (android) using the following </p>

<pre><code>FileInputStream fis = openFileInput(filename);
</code></pre>

<p>and then maybe use BufferedReader/writer. Anyways, I am trying to save String and numbers and  I was wondering what would be the best method to write and read from I/O for such case?
I was about to do the following for reading </p>

<pre><code>FileInputStream fis = openFileInput(filename);
InputStreamReader inputStreamReader = new InputStreamReader(fis);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
</code></pre>

<p>and for writing</p>

<pre><code>FileOutputStream fos = openFileOutput(filename, 20);
OutputStreamWriter outStreamReader = new OutputStreamWriter(fos);
BufferedWriter bufferedWriter = new BufferedWriter(outStreamReader);
</code></pre>

<p>but I noticed that the readLine will always return string of the line. so I have to go throught the conversion of Strings to Integer for some lines. Is this an efficient way of doing it (or correct way)? I feel I am missing something
Thank you</p>
