Splited TextStream into two classes: TextInputStream and TextOutputStream.