While getting data from a stream it is possible to reach the end, so we should check...