title: Java HTTP Request : get content size
body: <p>I want to know if it's possible to get the size of a web page with a http request.</p>
  
  <p>I use this to have oracle page length :</p>
  
  <pre><code>URL oracle = new URL("http://www.oracle.com/");
  URLConnection yc = oracle.openConnection();
  List&lt;String&gt; get = yc.getHeaderFields().get("content-Length");
  </code></pre>
  
  <p>But when I use this to a google page I do not have content-length in the header.</p>