url=new URL(" http://169.254.131.155:8080/webTeana/Trouble Is A Friend.mp3");
HttpURLConnection httpURLConnection=(HttpURLConnection) url.openConnection();
InputStream inputStream=httpURLConnection.getInputStream();
return inputStream;
得到的inputStream为空!
提示:HTTP505错误
:无法找到 http://169.254.131.155:8080/webTeana/Trouble Is A Friend.mp3文件
:HTTP version error
原因:路径空格问题
解决: url=new URL("http://169.254.131.155:8080/webTeana/Trouble%20Is%20A%20Friend.mp3");
即调用方法str.replaceAll(" ", "%20")
在此很谢谢老彭的指点