java - HttpURLConnection show progress -


i use httpurlconnection connect server.i want show update proress.

url url = new url(requesturl); httpurlconnection conn = (httpurlconnection) url.openconnection(); conn.set...// many params. dataoutputstream dos = new dataoutputstream(conn.getoutputstream()); dos.write("http string"); // eg content-disposition: form-data...... inputstream = new fileinputstream(file); // take file stream. while(){    dos.write(filestring);// take file strean memory.this place can take prograss,but in momory,not post server proress. } dos.flush(); inputstream input = conn.getinputstream(); // place post data server,but donot how progress. 

please me ,thanks.

you use asynctask that.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -