Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you need to do any further closing on an FileOutputStream when using Bitmap.compress()?

Tags:

android

bitmap

Most of the examples I have seen online have something similar to:

FileOutputStream out = new FileOutputStream(someFilename);
someBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);

Is any additional work needed to close the stream and ensure that it was flushed to the disk properly?

like image 758
cottonBallPaws Avatar asked Mar 02 '11 07:03

cottonBallPaws


1 Answers

You should definitely call close() on the stream :)

like image 60
Romain Guy Avatar answered Oct 14 '22 08:10

Romain Guy