title: Is it possible to check progress of URLconnection.getInputStream()?
body: <p>I want to check progress of downloading file by URLconnection. Is it possible or should I use another library? This is my urlconnection function:</p>
  
  <pre><code>public static String sendPostRequest(String httpURL, String data) throws UnsupportedEncodingException, MalformedURLException, IOException {
      URL url = new URL(httpURL);
  
      URLConnection conn = url.openConnection();
      //conn.addRequestProperty("Content-Type", "text/html; charset=iso-8859-2");
      conn.setDoOutput(true);
      OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
      wr.write(data);
      wr.flush();
  
      BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream(), "ISO-8859-2"));
      String line, all = "";
      while ((line = rd.readLine()) != null) {
          all = all + line;
      }
      wr.close();
      rd.close();
      return all;
  }
  </code></pre>
  
  <p>I understand that whole file is downloaded in this line (or worng)?:</p>
  
  <pre><code>BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream(), "ISO-8859-2"));
  </code></pre>
  
  <p>So is it possible to do this in this code?</p>