The DataOutputStream always closes the underlying stream, so my first idea was to reallocate both stream each time. Place for improvemtns or not. Karsten