这样:urlStr --> URL -->  urlConn --> inputStream
public InputStream getInputStreamFromUrl(String urlStr) throws IOException{
url = new URL(urlStr);
HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
InputStream inputStream = urlConn.getInputStream();
return inputStream;
}
有个问题啊,普通的URL没问题,比如:www.xxxxxx.com/xxxxxxxx.mp3可以,
但比如百度音乐就不行:www.xxxxxx.com/xxxxxxxx.mp3?xcode=asdferteteryterte怎么处理????
androidurl