Implemented Stream class.