So I know that one of the ways to define a file reader is by saying:
FileReader file = new FileReader(f);
where f is a file class. In my code, I create the file class just before I define the fileReader, and it gives me a FileNotFoundException.
Here is the code that is giving me problems:
InputStream inputStream = getResources().openRawResource(R.raw.stats);
String baseDir = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
String fileName = "com/example/magulo/testing123/stats.csv";
String filePath = baseDir + File.separator + fileName;
File f = new File(filePath);
FileReader file = new FileReader(f); //this throws FileNotFound
CSVReader reader = new CSVReader(file);
This is in the protected void onCreate. Stats.csv is a file which is in both a folder named raw in res and is also copied in the same folder as the erroring-code, the java folder. Why is the fileReader not finding the file? The file is declared without any problems...