When HTTPConnection is performed and what is its status
<p>I have below code which generate OutputStream from <code>HttpURLConnection</code> 
 When connection is actually performed and how can I check its status?</p>

<pre><code>  HttpURLConnection httpCon = (HttpURLConnection) url.openConnection();
  httpCon.setDoOutput(true);
  httpCon.setRequestMethod("PUT");
  httpCon.addRequestProperty("X-Auth-Token", getAuthToken());
  httpCon.setDoInput(true);
  httpCon.setRequestProperty("Connection", "close");
  httpCon.setReadTimeout(READ_TIMEOUT);
  httpCon.setRequestProperty("Transfer-Encoding","chunked");
  httpCon.setDoOutput(true);
  httpCon.setChunkedStreamingMode(STREAMING_CHUNK);
  mOutputStream  = httpCon.getOutputStream();
</code></pre>