stream isClosed() method should return only true/false.