Skip to content

Instantly share code, notes, and snippets.

@Airfixed
Created April 13, 2016 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Airfixed/799e784696b0a60c5423d347bf33a341 to your computer and use it in GitHub Desktop.
Save Airfixed/799e784696b0a60c5423d347bf33a341 to your computer and use it in GitHub Desktop.
For Doug Stevenson
InputStreamReader InputSR = null;
BufferedReader BufferedRdr = null;
String thisLine = null;
InputSR = new InputStreamReader(getResources().openRawResource(R.raw.fuel_index));
BufferedRdr = new BufferedReader(InputSR);
Object[][] arrayString = new String[6][2];
try {
// open input stream test.txt for reading purpose.
int i = 0;
while ((thisLine = BufferedRdr.readLine()) != null) {
// System.out.println(thisLine);
String[] parts = thisLine.split(" ");
arrayString[i][0] = parts[0];
arrayString[i][1] = parts[1];
// Log.v(Arrays.toString(arrayString));
Log.v("LogExample"+i+"0", String.valueOf(arrayString[i][0]));
Log.v("LogExample"+i+"1", String.valueOf(arrayString[i][1]));
i = i +1;
}
} catch (Exception e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment