Add doc and test for directly reading stream.