-5

I want to learn more about Android apps.
So, I want an explanation of the out=context.openFileOutput arguments .

public void saveImage(Context context, Bitmap b,String name,String extension){
name=name+"."+extension;
FileOutputStream out;
try {
    out = context.openFileOutput(name, Context.MODE_PRIVATE);
    b.compress(Bitmap.CompressFormat.JPEG, 90, out);
    out.close();
} catch (Exception e) {
    e.printStackTrace();
}
}

Any help will be appreciated.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

0

out is a FileOutputStream that is created in order to save the Bitmap to the file that is created or opened by context.openFileOutput with the name of the value of name

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245