Converting x-www-form-urlencoded Data
import java.net.URLEncoder; public class Main { public static void main(String[] argv) throws Exception { String line = URLEncoder.encode("name1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8"); } }