...
Note that the read methods will return as soon as they find some input data. By default, none of them guarantee that all the requested bytes will be read. It is left to the programmer to check the number of bytes read and call the read method again as required. This behavior is also Ignoring the result returned by the read methods is a direct violation of EXP02-J. Do not ignore values returned by methods.
...