Input and output stream tool class