Use a Type for the stream pointers instead of void* so we have better error checking.