title: Android getContentLength always return -1 when downloading apk file
body: <p>I'm using the following code for downloading file in my Android project:</p>
  
  <pre><code>URL url = new URL(fileUrl);
  URLConnection conection= url.openConnection();
  conection.setDoOutput(true);
  conection.connect();
  int lenghtOfFile = conection.getContentLength();
  </code></pre>
  
  <p>If <strong>fileUrl</strong> is apk, <strong>lenghtOfFile</strong> always return -1.<br/>
  But if it is image, video type,... lenghtOfFile return is exactly.</p>
  
  <p>Why ?<br/></p>
  
  <p><em>I'm using eclipse, Android SDK revision 23.</em></p>