Added extra functions to data in/out streams and testutils