我使用HttpURLConnection连接我的服务器。我想显示更新进度。
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 is = new FileInputStream(file); // Take file to Stream.
while(){
dos.write(fileString);// Take file Strean to memory.This place can take prograss,but just in momory,not post to server proress.
}
dos.flush();
InputStream input = conn.getInputStream(); // This place will post data to server,but i donot how to get progress.
请帮帮我,谢谢。