Here you can find the source of writeContent(HttpURLConnection urlConn, String content)
static void writeContent(HttpURLConnection urlConn, String content) throws IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; public class Main { static void writeContent(HttpURLConnection urlConn, String content) throws IOException { OutputStreamWriter out = new OutputStreamWriter(urlConn.getOutputStream()); out.write(content);/*from w w w.j a v a2s. c o m*/ out.close(); } }