Adding input and output stream implementations

Same as the last pull request except with a cleaner commit history.  Let me know if you'd like anything changed.