Add a constructor to stream.class.php