遇到中文要转译
String urlStr = http://10.10.10.10:8080/servertest/周杰伦.mp3;
String docname = urlStr.substring(urlStr.lastIndexOf("/") + 1);
urlStr = urlStr.substring(0,urlStr .lastIndexOf("/"))+"/"+URLEncoder.encode(docname,"utf-8");
URL url = new URL(urlStr);
HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
前面的 http://10.10.10.10:8080 不要进行转码,只对后面的进行转码就可以了