-
public bool save(SaveableObject s, Context context, String fileName)
{
try
{
FileOutputStream fos;
ObjectOutputStream os;
File file1 = context.getExternalFilesDir(null);
File file2 = new File(file1, fileName);
fileName = file2.getAbsolutePath();
fos = context.openFileOutput(fileName, Context.MODE_PRIVATE);
os = new ObjectOutputStream(fos);
os.writeObject((Object)analysis);
os.close();
fos.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
/sdcard/fileName.