use non-flowing mode in the fromStream() function