I'm trying to read from internal storage (a file) however i'm having issues.
I get a FileInputStream
for a file using FileInputStream fis = context.openFileInput(filename)
.
The call is successful, nothing fails. Next I try to create an ObjectInputStream
object using the following line: ObjectInputStream ois = new ObjectInputStream(fis)
.
This throws an IOException
EVERY time!! What am I doing wrong?
I've tried using fis
as a FileInputStream
and as an InputStream
object.
I'm able to write to a file using ObjectOutputStream
.