I have extracted this functionality out into the StreamHandler class.
I have extracted this functionality out into the StreamHandler class.