INTEXT-45 Add Work Around for INT-2936

Need to check for closed stream with NIO.