android新手,URL问题。
这样: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
怎么处理????
android url --------------------编程问答--------------------
url = new URL(urlStr);这样好像 URL不能正常转化?
补充:移动开发 , Android