generialize in/out stream common parameters.