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

Most of the examples I've seen on the Internet have something similar to:

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

Does it take extra work to close the stream and make sure it fits correctly on disk?

+6
android bitmap
source share
1 answer

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

+9
source share

All Articles