In my app I save some files using FileOutputStream class:
FileOutputStream fos;
fos = openFileOutput("my_file", Context.MODE_PRIVATE);
ObjectOutputStream os = new ObjectOutputStream(fos);
os.writeObject(classToSave);
os.close();
If I upgrade my app anche the I execute:
FileInputStream fis = null;
fis = openFileInput("my_file");
ObjectInputStream is = new ObjectInputStream(fis);
myData = (MyClass) is.readObject();
is.close();
does fis is null or it contains the class that I saved before upgrade?
The file itself will be still there after the upgrade. If you can retrieve the serialised object depends on which changes you made to
MyClassin the source code.