FileOutputStream::write() not checking for openedOk()

I was not checking FileOutputStream::openedOk() before writing, and was relying on FileOutputStream::write() to return false if the write operation fails for some reason.

but FileOutputStream::write() may return true even if the fileOutputStream failed to open. Shouldn’t it return false in that case?


1 Like