a stream is used for input and output.