I want to read a file that is saved in my java
folder (same where my activities are) in package com.example
so it's java-->com.example--> data.ser. However I'm getting java.io.FileNotFoundException: /java/com/example/data.ser: open failed: ENOENT (No such file or directory)
when I call
ObjectInputStream in = new ObjectInputStream(new FileInputStream(new File("java/com/example/data.ser")));
. I tried removing the java part or just leaving the file name on its own but nothing works. I am not loading it from external/internal storage but just from within the app. How to do it? I'm using android studio. Thanks for help