Just to vendor a thought, I wonder why the read methods of FileInputStream do not return a boolean value. Let me describe:
The description of read(byte[], offset, length) states that it returns an integer, switching two cases:
"the total number of bytes read into buffer, or -1 if there is no more data because the eof is reached."
What if the array length is not reached after eof? The first thing that comes to my mind is that it should throw an exception, because the allocated memory of byte array is not fulfilled.
Say it returns -1 for not throwing an exception, then the byte array is full. What's the point of returning that value (the total number of bytes) which is array.length?