Open the stream.