Stream reader and writer implementation.
New exception types - unsupported operation and closed stream.