use the utils on StreamInput / StreamOutput for this :)