HttpURLConnection issue
<p>i am trying to connect a http url.But it shows a "already  connected" exception.
also please find any problem with my basic authentication .</p>

<pre><code>  HttpURLConnection conn = (HttpURLConnection) url
              .openConnection();
  conn.setRequestMethod("POST");

  BASE64Encoder enc = new sun.misc.BASE64Encoder();
  String userpassword = user + ":" + password;
  String encodedAuthorization = enc.encode(userpassword.getBytes() );
  conn.setRequestProperty("Authorization", "Basic "+ encodedAuthorization);
  conn.setDoInput(true);
  conn.setDoOutput(true);
  conn.setRequestMethod("POST");
  conn.setRequestProperty("Content-Length",
  String.valueOf(data.length()));
  conn.setRequestProperty("Content-Type","application/x-www- form-urlencoded");
  conn.setRequestProperty("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
</code></pre>
