Java: correct formation of x-www-form-urlencoded POST requests