Implemented Issue #70

Unable to implement an output stream implementation without a complex
solution. Instead, added a setStream method that allows to modify
output stream.