android断点续传实现方案之三

URL url = new URL("http://www.sjtu.edu.cn/down.zip");   
HttpURLConnection httpConnection = (HttpURLConnection)url.openConnection();   
  
// 设置 User-Agent   
httpConnection.setRequestProperty("User-Agent","NetFox");   
// 设置断点续传的开始位置   
httpConnection.setRequestProperty("RANGE","bytes=2000070");   
// 获得输入流   
InputStream input = httpConnection.getInputStream(); 
原文地址:https://www.cnblogs.com/xushihai/p/4600906.html