1

I tried to save data from my own class to File! My class is

odmiana

The code looks like that:

od = new odmiana(e1.getText().toString(),e2.getText().toString(),e3.getText().toString(),e4.getText().toString(),e5.getText().toString(),e6.getText().toString());
String filename = "myfile";
FileOutputStream outputStream;

try {
    outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
    outputStream.write(od);
    outputStream.close();
} catch (Exception e) {
    e.printStackTrace();
}

Can you help me?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Jakub Lelek
  • 27
  • 1
  • 5

0 Answers0